-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from infinum/fix/lint-update
Fix/lint update
- Loading branch information
Showing
23 changed files
with
207 additions
and
94 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
-keeppackagenames | ||
-keep public class com.infinum.collar.* { | ||
public protected *; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
lint/src/main/kotlin/com/infinum/collar/lint/CollarIssueRegistry.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.infinum.collar.lint | ||
|
||
import com.android.tools.lint.client.api.IssueRegistry | ||
import com.android.tools.lint.client.api.Vendor | ||
import com.android.tools.lint.detector.api.CURRENT_API | ||
import com.android.tools.lint.detector.api.Issue | ||
|
||
@Suppress("UnstableApiUsage") | ||
public class CollarIssueRegistry : IssueRegistry() { | ||
|
||
override val vendor: Vendor = Vendor( | ||
vendorName = "Infinum Inc.", | ||
identifier = "com.infinum.collar:collar-lint:{version}", | ||
feedbackUrl = "https://github.com/infinum/android-collar/issues" | ||
) | ||
|
||
override val issues: List<Issue> = IssueFactory.issues() | ||
|
||
override val api: Int = CURRENT_API | ||
} |
35 changes: 35 additions & 0 deletions
35
lint/src/main/kotlin/com/infinum/collar/lint/IssueFactory.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.infinum.collar.lint | ||
|
||
import com.android.tools.lint.detector.api.Category | ||
import com.android.tools.lint.detector.api.Implementation | ||
import com.android.tools.lint.detector.api.Issue | ||
import com.android.tools.lint.detector.api.Scope | ||
import com.android.tools.lint.detector.api.Severity | ||
import com.infinum.collar.lint.detectors.MissingScreenNameAnnotationDetector | ||
import java.util.EnumSet | ||
|
||
@Suppress("UnstableApiUsage") | ||
internal object IssueFactory { | ||
|
||
fun issues(): List<Issue> = listOf( | ||
MISSING_SCREEN_NAME_ANNOTATION | ||
) | ||
|
||
val MISSING_SCREEN_NAME_ANNOTATION: Issue = Issue.create( | ||
id = "MissingScreenNameAnnotation", | ||
briefDescription = "Missing screen name annotation.", | ||
explanation = "All Activities and Fragments require a valid screen name annotation on the class." + | ||
"\nYou must annotate an Activity or Fragment with @ScreenName with a valid value parameter " + | ||
"or set enabled parameter to false.", | ||
category = Category.CORRECTNESS, | ||
priority = 5, | ||
severity = Severity.WARNING, | ||
implementation = Implementation( | ||
MissingScreenNameAnnotationDetector::class.java, | ||
EnumSet.of( | ||
Scope.JAVA_FILE, | ||
Scope.TEST_SOURCES | ||
) | ||
) | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
lint/src/main/kotlin/com/infinum/collar/lint/issues/Issues.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.