David Allison
5fbb8801e8
docs: improve lint error
...
Was ambiguous about adding the attribute to just one string
2021-04-26 05:02:29 +02:00
Prateek Singh
11667f9de6
Updated Fixed Title length lint rule
2021-04-24 02:38:37 +02:00
Mike Hardy
61cb6c3f05
Update to gradle 7.0
...
- API publishing needed a complete overhaul, tested locally, works
- JCenter is still needed for AnkiDroid as noted unfortunately...couple months to go
- Some artifact resolution performance complaints but local testing shows every single thing works
2021-04-15 23:21:34 -05:00
Mrudul Tora
557eff4dc8
Lint: Lint rule for use of UIUtils.showSnackbar instead of Snackbar.make ( #8625 )
...
* Added lint rule for use of UIUtils.showSnackbar instead of Snackbar.make
* Fixed the lint errors related to Snackbar.make
* Fixed inconsistent spacing
Co-authored-by: David Allison <62114487+david-allison-1@users.noreply.github.com>
2021-04-15 22:44:46 -05:00
David Allison
3541c210d8
Add lint rule to enforce constant field naming
...
For: `public static final` variables
Lint Id: ConstantFieldName
Automation: Means that we don't need to enforce this in code reviews
Constant (final variables) names must be all uppercase using underscore
to separate words.
https://github.com/ankidroid/Anki-Android/wiki/Code-style#constant-final-variables-names-must-be-all-uppercase-using-underscore-to-separate-words
Note: The wording is imprecise: so only flag public constants
2021-04-14 12:43:52 -05:00
David Allison
f1e37dc557
Add lint rule to enforce 'm' variable prefix
...
For: Non-Static, Non-Public variables
Lint Id: NonPublicNonStaticFieldName
Automation: Means that we don't need to enforce this in code reviews
https://github.com/ankidroid/Anki-Android/wiki/Code-style#non-public-non-static-field-names-should-start-with-m
2021-04-14 12:43:52 -05:00
Nicola Dardanis
901260bed6
lint: Reorder rules lexicographically in IssueRegistry
2021-04-14 11:15:14 -05:00
Nicola Dardanis
f8135927d1
lint: Add DirectToastMakeTextUsage rule
2021-04-14 11:15:14 -05:00
David Allison
89a7679839
Add lint rule: PrintStackTraceUsage
...
Speed up code review by ensuring that e.printStackTrace() isn't used
Also includes AnkiDroid's first "Auto-Fix" for lint
2021-04-08 10:08:22 -05:00
dependabot-preview[bot]
b7537af36a
Bump lint-api from 27.1.2 to 27.1.3
...
Bumps lint-api from 27.1.2 to 27.1.3.
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Bump lint-tests from 27.1.2 to 27.1.3
Bumps lint-tests from 27.1.2 to 27.1.3.
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Bump lint from 27.1.2 to 27.1.3 (#303 )
* Bump lint from 27.1.2 to 27.1.3
Bumps lint from 27.1.2 to 27.1.3.
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Update lint-rules/build.gradle
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Mike Hardy <github@mikehardy.net>
2021-03-19 15:31:02 -05:00
Mike Hardy
fdf12ea82d
Dependency updates 20210302 ( #8135 )
...
* Bump junit from 4.13.1 to 4.13.2
Bumps [junit](https://github.com/junit-team/junit4 ) from 4.13.1 to 4.13.2.
- [Release notes](https://github.com/junit-team/junit4/releases )
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.13.1.md )
- [Commits](https://github.com/junit-team/junit4/compare/r4.13.1...r4.13.2 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Bump protobuf-java from 3.14.0 to 3.15.1
Bumps [protobuf-java](https://github.com/protocolbuffers/protobuf ) from 3.14.0 to 3.15.1.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases )
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/master/generate_changelog.py )
- [Commits](https://github.com/protocolbuffers/protobuf/compare/v3.14.0...v3.15.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Bump mockito-inline from 3.7.7 to 3.8.0
Bumps [mockito-inline](https://github.com/mockito/mockito ) from 3.7.7 to 3.8.0.
- [Release notes](https://github.com/mockito/mockito/releases )
- [Commits](https://github.com/mockito/mockito/compare/v3.7.7...v3.8.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Bump protobuf-java from 3.15.1 to 3.15.2
Bumps [protobuf-java](https://github.com/protocolbuffers/protobuf ) from 3.15.1 to 3.15.2.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases )
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/master/generate_changelog.py )
- [Commits](https://github.com/protocolbuffers/protobuf/compare/v3.15.1...v3.15.2 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Bump protobuf-java from 3.15.2 to 3.15.3
Bumps [protobuf-java](https://github.com/protocolbuffers/protobuf ) from 3.15.2 to 3.15.3.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases )
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/master/generate_changelog.py )
- [Commits](https://github.com/protocolbuffers/protobuf/compare/v3.15.2...v3.15.3 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-02 11:35:18 -05:00
Mike Hardy
a25cb062a4
Dependency updates 20210120 ( #8029 )
...
* Bump mockito-inline from 3.6.28 to 3.7.0
Bumps [mockito-inline](https://github.com/mockito/mockito ) from 3.6.28 to 3.7.0.
- [Release notes](https://github.com/mockito/mockito/releases )
- [Commits](https://github.com/mockito/mockito/compare/v3.6.28...v3.7.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Bump mockito-inline from 3.7.0 to 3.7.7
Bumps [mockito-inline](https://github.com/mockito/mockito ) from 3.7.0 to 3.7.7.
- [Release notes](https://github.com/mockito/mockito/releases )
- [Commits](https://github.com/mockito/mockito/compare/v3.7.0...v3.7.7 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Bump gradle from 4.1.1 to 4.1.2
Bumps gradle from 4.1.1 to 4.1.2.
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Bump lint-tests from 27.1.1 to 27.1.2
Bumps lint-tests from 27.1.1 to 27.1.2.
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Bump sqlite-android from 3.33.0 to 3.34.0
Bumps [sqlite-android](https://github.com/requery/sqlite-android ) from 3.33.0 to 3.34.0.
- [Release notes](https://github.com/requery/sqlite-android/releases )
- [Changelog](https://github.com/requery/sqlite-android/blob/master/CHANGELOG.md )
- [Commits](https://github.com/requery/sqlite-android/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Bump lint-api from 27.1.1 to 27.1.2
Bumps lint-api from 27.1.1 to 27.1.2.
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Bump lint to 27.1.2 to match other lint artifacts
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-20 10:03:14 -05:00
David Allison
db82ab008a
InconsistentAnnotationUsage: Improve Explanation
...
There is also a hierarchy in the inspections panel.
Display this so the developer can find it in the list without the search
Improves on 7020
2020-12-29 11:42:50 -05:00
David Allison
220bf39aaa
Duplicate CrowdIn Strings: Automate PR Step
...
Now handled by code, +1 for automation
Fixed by: 7582
2020-11-20 07:46:54 -05:00
David Allison
1543f0f900
Duplicate CrowdIn Strings: Cleanup
...
Kill some dead code, and add quotes for console output.
Related: 7582
2020-11-20 07:46:54 -05:00
David Allison
1eab35e040
Duplicate CrowdIn Strings: Explain fixes
...
Explained user should add a comment attribute if the change is legit
Related: 7582
2020-11-20 07:46:54 -05:00
David Allison
6caf7a9be6
Duplicate CrowdIn Strings: Allow str with comment
...
If all instances of a string have comments - ignore it.
Related: 7582
2020-11-20 07:46:54 -05:00
David Allison
c51bbc004f
NF: Duplicate CrowdIn Strings - Invert if
...
Massive improvement in readability
Related: 7582
2020-11-20 07:46:54 -05:00
David Allison
4c140c6f24
Duplicate CrowdIn Strings: Ignore translated
...
We only want to check and warn for duplicates in our new strings
Related: 7582
2020-11-20 07:46:54 -05:00
David Allison
60b7c8ec1d
Add DuplicateCrowdInStrings lint check
...
Converted from Kotlin to Java from AOSP
Convert: StringCasingDetector.kt to java
Use methods from: StringFormatDetector.java
Related: 7582
2020-11-20 07:46:54 -05:00
Mike Hardy
54bb9c96f9
Bump main lint dependency to 27.1.1 to match lint sub-dependencies
2020-11-11 14:12:53 -05:00
dependabot-preview[bot]
3d28e9d5d4
Bump lint from 27.1.0 to 27.1.1
...
Bumps lint from 27.1.0 to 27.1.1.
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-11 14:12:53 -05:00
dependabot-preview[bot]
6543c39231
Bump lint-api from 27.1.0 to 27.1.1
...
Bumps lint-api from 27.1.0 to 27.1.1.
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-11 14:12:53 -05:00
dependabot-preview[bot]
9af6693fb5
Bump lint-tests from 27.1.0 to 27.1.1
...
Bumps lint-tests from 27.1.0 to 27.1.1.
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-11 14:12:53 -05:00
dependabot-preview[bot]
a922f16eb6
Bump lint from 27.0.2 to 27.1.0
...
Bumps lint from 27.0.2 to 27.1.0.
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-14 16:21:41 -05:00
dependabot-preview[bot]
0821379bb5
Bump lint-tests from 27.0.2 to 27.1.0
...
Bumps lint-tests from 27.0.2 to 27.1.0.
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-14 06:06:10 -05:00
dependabot-preview[bot]
dd0aa075cd
Bump lint from 27.0.2 to 27.1.0
...
Bumps lint from 27.0.2 to 27.1.0.
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-14 06:06:10 -05:00
dependabot-preview[bot]
28aadadab9
Bump junit from 4.13 to 4.13.1
...
Bumps [junit](https://github.com/junit-team/junit4 ) from 4.13 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases )
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.13.1.md )
- [Commits](https://github.com/junit-team/junit4/compare/r4.13...r4.13.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-14 06:06:10 -05:00
dependabot-preview[bot]
8dbf0e2a85
Bump lint from 27.0.1 to 27.0.2
...
Bumps lint from 27.0.1 to 27.0.2.
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-14 06:06:10 -05:00
dependabot-preview[bot]
c48d592fee
Bump lint-api from 27.0.1 to 27.0.2
...
Bumps lint-api from 27.0.1 to 27.0.2.
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-07 15:09:22 -05:00
dependabot-preview[bot]
cc5b3a5e59
Bump lint-tests from 27.0.1 to 27.0.2
...
Bumps lint-tests from 27.0.1 to 27.0.2.
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-07 15:09:22 -05:00
Arthur Milchior
500b954689
NF: Remove warning about unanotated language
2020-09-30 22:10:22 -05:00
lukstbit
d6de360fac
Add DuplicateTextInPreferencesXml lint check
2020-09-28 08:35:30 -05:00
Arthur Milchior
4935ac517d
NF: Sort imports
2020-09-23 11:19:42 -05:00
Arthur Milchior
1f785c1b8c
NF: Remove warning about parameter that could be final
2020-09-23 11:08:06 -05:00
Arthur Milchior
9892bea706
NF: ignore BooleanMethodIsAlwaysInverted
...
Those warning makes a lot of sens, but it would lead to "isForbidden" instead of "isAuthorized" which makes little sens
in practice
2020-09-21 09:18:12 -05:00
David Allison
da5968ec39
Add lint check: Use of JetBrains annotations
...
We have standardised on androidx annotations, this helps new users and suggests
an IDE option to change to the correct library.
This does appear in the IDE, so we can define it as an error, rather than a warning.
2020-09-04 12:21:24 -05:00
lukstbit
1eea5d7126
Allow dates created with long time
2020-08-30 18:24:56 -05:00
lukstbit
018c1db71f
Update severity for time related lint violations
2020-08-30 18:24:56 -05:00
lukstbit
de3f38ee37
Add lint checks for new time api
2020-08-25 10:04:26 +02:00