Skip to content

Commit

Permalink
Update README: refer check.
Browse files Browse the repository at this point in the history
  • Loading branch information
tanlehua committed Jan 19, 2020
1 parent 78ce165 commit 039805d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions refer-check-plugin/README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ classpath "com.bytedance.android.byteX:refer-check-plugin:${plugin_version}"

```groovy
apply plugin: 'bytex.refer_check'
no_such_method_check {
refer_check {
enable true
enableInDebug false
logLevel "INFO"
strictMode true // 控制是否在发现不存在方法时中止构建
// check白名单。类名和方法名要用#号分隔开,都支持正则匹配。
whiteList = [
"com/google/+", // 跳过com/google为包名前缀的类
// 跳过AppLogChannel这个类里方法名为init$abc的检查,注意$符号要转义
"com/ss/android/statistic/channel/AppLogChannel#init\$abc",
// 跳过AppLog这个类里方法名为init的检查
"com/ss/android/common/applog/AppLog#init"
// 跳过com/tellh/Foo这个类里方法名为init的检查
"com/tellh/Foo#init",
// 跳过com/tellh/Foo里的内部类Abc,方法名为init的检查,注意$符号要转义
"com/tellh/Foo\$Abc#init",
]
}
```
Expand Down
10 changes: 5 additions & 5 deletions refer-check-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ classpath "com.bytedance.android.byteX:refer-check-plugin:${plugin_version}"

```groovy
apply plugin: 'bytex.refer_check'
no_such_method_check {
refer_check {
enable true
enableInDebug false
logLevel "INFO"
strictMode true // to control whether to abort the build if no method does not exist
// check whitelist. Class names and method names must be separated by a '#', and both support regular matching.
whiteList = [
"com/google/+", // Skip classes prefixed with 'com/google'
// Skip checking the method named 'init$abc' in the class 'com/ss/android/statistic/channel/AppLogChannel'. Don't forget the escape before '$'.
"com/ss/android/statistic/channel/AppLogChannel#init\$abc",
// Skip checking the method named 'init' in the class named 'com/ss/android/common/applog/AppLog'
"com/ss/android/common/applog/AppLog#init"
// Skip checking the method named 'init' in the class named 'com/tellh/Foo'
"com/tellh/Foo#init",
// Skip checking the method named 'init' in the inner class 'Abc' of 'com/tellh/Foo'. Don't forget the escape before '$'.
"com/tellh/Foo\$Abc#init",
]
}
```
Expand Down

0 comments on commit 039805d

Please sign in to comment.