* 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>
AGP 7.4.1
Description:
Configuration related to lint is now performed using the lint block.
----
Change summary: Automated change + manual fixups
Automated change blanked and inlined lint.gradle into `build.gradle`
Manually fixed this to change `lint.gradle`
Afterwards, we have a NullReferenceException caused by `textOutput "stdout"`
From the docs:
> To output the lint report to stdout set textReport=true, and leave textOutput unset.
https://developer.android.com/reference/tools/gradle-api/7.3/com/android/build/api/dsl/Lint#textOutput()
After moving to AGP 7, we can no longer apply lintConfig on
`task.doFirst`
Since we're not using the baseline/debug config, we might as well
simplify this file and remove the implementation.
Baseline usage was never properly implemented, and was on Travis CI
which we are no longer using.
Related: 9338
> If I understand it correctly based on the text provided in the
> output, is not actionable by us - it is an upstream issue.
> I've taken it upon myself to PR upstream lots of times for things
> that affect AnkiDroid (in requery, doing google-analytics-java,
> google libraries etc) but this seems like it will be recurring
> and upstream, and for me that's just upstream responsibility,
> no action for me. So not worth seeing
Documented in #6211
Based on a discussion in #6205, we currently have more important issues
picked up by lint than performance penalties.
This removes 875 lint warnings. We should eventually re-enable this once
we have lint errors close to, or nearer to zero.
I changed my personal config to mark these as 'Weak Warning'
We want to expose when the lint results change vs current baseline, but
we can't hard fail on them because they are subject to false-positive just because
line numbers changed
For the smaller set of things that we classify as release blockers we do want
CI to check and hard fail for
Also updated the current debug baseline
If this is correct then future lint errors should break the build,
while existing ones will pass.
This should put a cap on the accretion of new lint while we start
to whittle down the existing pile