0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 03:52:15 +02:00
Anki-Android/lint.gradle

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
583 B
Groovy
Raw Normal View History

// see .editorconfig for ktlint-related rules
Dependency Updates 20220219 (#13305) * Bump org.jlleitschuh.gradle:ktlint-gradle from 11.1.0 to 11.2.0 (#13265) * Bump org.jlleitschuh.gradle:ktlint-gradle from 11.1.0 to 11.2.0 Bumps org.jlleitschuh.gradle:ktlint-gradle from 11.1.0 to 11.2.0. --- updated-dependencies: - dependency-name: org.jlleitschuh.gradle:ktlint-gradle dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): move ktlint rules to .editorconfig With new syntax ---- An individual property can be enabled or disabled with a rule property. The name of the rule property consists of the ktlint_ prefix followed by the rule set id followed by a _ and the rule id. > https://pinterest.github.io/ktlint/faq/#why-is-editorconfig-property-disabled_rules-deprecated-and-how-do-i-resolve-this ---- disabled_rules is deprecated: https://pinterest.github.io/ktlint/faq/#why-is-editorconfig-property-disabled_rules-deprecated-and-how-do-i-resolve-this ktlint-gradle v11.2.0 resolves a few issues around this > Fixed disabled_rules set only in editorconfig in ktlint 0.46+ > Fixed disabled_rules warning when using new editorconfig syntax in ktlint 0.48+ https://github.com/JLLeitschuh/ktlint-gradle/releases/tag/v11.2.0 * lint: fix new ktlint errors Caused when we remove the version specifier in ktlint-gradle * Argument should be on a separate line (unless all arguments can fit a single line) * File annotations should be separated from file contents with a blank line * Declarations and declarations with comments should have an empty space between. * Multiple annotations should not be placed on the same line as the annotated construct Removed unused `KotlinCleanup` class rather than fixing lint errors * build(deps): depend on ktlint-gradle's ktlint Some lint indentation was reduced due to this. Fixed it manually as I didn't like the change --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: David Allison <62114487+david-allison@users.noreply.github.com> * autoformat squash --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: David Allison <62114487+david-allison@users.noreply.github.com>
2023-02-19 18:15:26 +01:00
android {
lint {
abortOnError true
checkReleaseBuilds true
checkTestSources true
explainIssues false
lintConfig file('../lint-release.xml')
showAll true
// To output the lint report to stdout set textReport=true, and leave textOutput unset.
textReport true
warningsAsErrors true
if (System.getenv("CI") == "true") {
// 14853: we want this to appear in the IDE, but it adds noise to CI
disable += "WrongThread"
}
}
}