update: re-weigh priority of custom lint

This commit is contained in:
kayo5994
2017-10-16 15:58:38 +08:00
parent 4a0f13c969
commit bfa296a30a
8 changed files with 7 additions and 10 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ configurations.all {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':qmuilint')
// compile 'com.qmuiteam:qmuilint:1.0.0'
// compile 'com.qmuiteam:qmuilint:1.0.1'
compile "com.android.support:appcompat-v7:$supportVersion"
compile 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
+1 -1
View File
@@ -1,7 +1,7 @@
apply plugin: 'com.android.library'
group = 'com.qmuiteam'
version = "1.0.0" // QMUI Lint 发布到 bintray 的版本号
version = "1.0.1" // QMUI Lint 发布到 bintray 的版本号
android {
compileSdkVersion project.ext.compileSdkVersion
-3
View File
@@ -1,8 +1,5 @@
apply plugin: 'java'
sourceCompatibility = "1.7"
targetCompatibility = "1.7"
configurations {
lintChecks
}
@@ -29,7 +29,7 @@ public class QMUIFWordDetector extends Detector
Issue.create("QMUIDontUseTheFWordInLog",
"Please, don't use the f word, type something more nicely.",
"Do I need to explain this? \uD83D\uDD95",
Category.MESSAGES, 5, Severity.WARNING,
Category.MESSAGES, 2, Severity.WARNING,
new Implementation(QMUIFWordDetector.class, Scope.JAVA_FILE_SCOPE));
@Override
@@ -28,7 +28,7 @@ public class QMUIImageScaleDetector extends Detector implements Detector.BinaryR
Issue.create("QMUIImageSizeDisproportionate",
"The size of this image is disproportionate.",
"Please check the size of the image, for example, the height and width of the 3x plot should be 1.5 times 2x plot.",
Category.CORRECTNESS, 5, Severity.WARNING,
Category.ICONS, 4, Severity.WARNING,
new Implementation(QMUIImageScaleDetector.class, Scope.BINARY_RESOURCE_FILE_SCOPE));
private static final String IGNORE_IMAGE_NIGHT_PNG = ".9.png";
@@ -27,7 +27,7 @@ public class QMUIImageSizeDetector extends Detector implements Detector.BinaryRe
Issue.create("QMUIImageSizeInvalid",
"The size of this image is not correct.",
"Please check the size of the image, for example, the height and width of the 2x plot should be even.",
Category.CORRECTNESS, 5, Severity.WARNING,
Category.ICONS, 2, Severity.WARNING,
new Implementation(QMUIImageSizeDetector.class, Scope.BINARY_RESOURCE_FILE_SCOPE));
private static final String IGNORE_IMAGE_NIGHT_PNG = ".9.png";
@@ -33,7 +33,7 @@ public class QMUIJavaVectorDrawableDetector extends Detector implements Detector
Issue.create("QMUIGetVectorDrawableWithWrongFunction",
"Should use the corresponding method to get vector drawable.",
"Using the normal method to get the vector drawable will cause a crash on Android versions below 4.0",
Category.ICONS, 2, Severity.ERROR,
Category.CORRECTNESS, 8, Severity.ERROR,
new Implementation(QMUIJavaVectorDrawableDetector.class, Scope.JAVA_FILE_SCOPE));
@Override
@@ -37,7 +37,7 @@ public class QMUIXmlVectorDrawableDetector extends ResourceXmlDetector {
Issue.create("QMUIGetVectorDrawableWithWrongProperty",
"Should use the corresponding property to get vector drawable.",
"Using the normal property to get the vector drawable will cause a crash on Android versions below 4.0.",
Category.ICONS, 2, Severity.ERROR,
Category.CORRECTNESS, 8, Severity.ERROR,
new Implementation(QMUIXmlVectorDrawableDetector.class, Scope.RESOURCE_FILE_SCOPE));
private static final Collection<String> mAttrList = Lists.newArrayList(ATTR_DRAWABLE_LEFT, ATTR_DRAWABLE_RIGHT, ATTR_DRAWABLE_TOP, ATTR_DRAWABLE_BOTTOM);