Damien Elmes
043ded7876
Catch some attempts to access UI inside withCol, and col within UI thread
...
If detected, shows an IDE lint.
- Catches calls to col.* inside AnkiActivity contexts.
- Catches calls to methods of classes derived from AnkiActivity, eg
```
withCol {
someDeckPickerMethod()
}
```
- UI classes that don't inherit from AnkiActivity are not caught unless
they are also annotated with @UiThread. Eg SetNotetypeListener in
NoteEditor references col, but is not caught without an extra annotation.
It might be best to wait until 2.16 is out (and any quick follow-up
releases to address the inevitable regressions) before we start addressing
these issues in bulk; for now the code might be better left as-is unless
it's to address a known bug someone has reported.
Related: #13944 , #13942 , #13936
2023-06-04 07:00:16 -03:00
David Allison
96a33d1f92
lint: enable 'MonochromeLauncherIcon'
...
Lint no longer fails
partial revert of 0ca2e6c204
Fixes 13197
2023-02-15 15:00:11 -05:00
Mike Hardy
81b8978900
Dependency updates 20220205 ( #13198 )
...
* Bump robolectric from 4.9.1 to 4.9.2
Bumps [robolectric](https://github.com/robolectric/robolectric ) from 4.9.1 to 4.9.2.
- [Release notes](https://github.com/robolectric/robolectric/releases )
- [Commits](https://github.com/robolectric/robolectric/compare/robolectric-4.9.1...robolectric-4.9.2 )
---
updated-dependencies:
- dependency-name: org.robolectric:robolectric
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump mockito-inline from 4.10.0 to 4.11.0
Bumps [mockito-inline](https://github.com/mockito/mockito ) from 4.10.0 to 4.11.0.
- [Release notes](https://github.com/mockito/mockito/releases )
- [Commits](https://github.com/mockito/mockito/compare/v4.10.0...v4.11.0 )
---
updated-dependencies:
- dependency-name: org.mockito:mockito-inline
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump junit from 1.1.4 to 1.1.5
Bumps junit from 1.1.4 to 1.1.5.
---
updated-dependencies:
- dependency-name: androidx.test.ext:junit
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump espresso_version from 3.5.0 to 3.5.1
Bumps `espresso_version` from 3.5.0 to 3.5.1.
Updates `espresso-core` from 3.5.0 to 3.5.1
Updates `espresso-contrib` from 3.5.0 to 3.5.1
---
updated-dependencies:
- dependency-name: androidx.test.espresso:espresso-core
dependency-type: direct:production
update-type: version-update:semver-patch
- dependency-name: androidx.test.espresso:espresso-contrib
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump webkit from 1.5.0 to 1.6.0
Bumps webkit from 1.5.0 to 1.6.0.
---
updated-dependencies:
- dependency-name: androidx.webkit:webkit
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump io.mockk:mockk from 1.13.3 to 1.13.4
Bumps [io.mockk:mockk](https://github.com/mockk/mockk ) from 1.13.3 to 1.13.4.
- [Release notes](https://github.com/mockk/mockk/releases )
- [Commits](https://github.com/mockk/mockk/compare/1.13.3...v1.13.4 )
---
updated-dependencies:
- dependency-name: io.mockk:mockk
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump org.mockito:mockito-inline from 4.11.0 to 5.1.1
Bumps [org.mockito:mockito-inline](https://github.com/mockito/mockito ) from 4.11.0 to 5.1.1.
- [Release notes](https://github.com/mockito/mockito/releases )
- [Commits](https://github.com/mockito/mockito/compare/v4.11.0...v5.1.1 )
---
updated-dependencies:
- dependency-name: org.mockito:mockito-inline
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump material from 1.7.0 to 1.8.0
Bumps [material](https://github.com/material-components/material-components-android ) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/material-components/material-components-android/releases )
- [Commits](https://github.com/material-components/material-components-android/compare/1.7.0...1.8.0 )
---
updated-dependencies:
- dependency-name: com.google.android.material:material
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump annotations from 23.1.0 to 24.0.0
Bumps [annotations](https://github.com/JetBrains/java-annotations ) from 23.1.0 to 24.0.0.
- [Release notes](https://github.com/JetBrains/java-annotations/releases )
- [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md )
- [Commits](https://github.com/JetBrains/java-annotations/compare/23.1.0...24.0.0 )
---
updated-dependencies:
- dependency-name: org.jetbrains:annotations
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump junit_version from 5.9.1 to 5.9.2
Bumps `junit_version` from 5.9.1 to 5.9.2.
Updates `junit-jupiter` from 5.9.1 to 5.9.2
- [Release notes](https://github.com/junit-team/junit5/releases )
- [Commits](https://github.com/junit-team/junit5/compare/r5.9.1...r5.9.2 )
Updates `junit-vintage-engine` from 5.9.1 to 5.9.2
- [Release notes](https://github.com/junit-team/junit5/releases )
- [Commits](https://github.com/junit-team/junit5/compare/r5.9.1...r5.9.2 )
Updates `junit-jupiter-params` from 5.9.1 to 5.9.2
- [Release notes](https://github.com/junit-team/junit5/releases )
- [Commits](https://github.com/junit-team/junit5/compare/r5.9.1...r5.9.2 )
---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
dependency-type: direct:production
update-type: version-update:semver-patch
- dependency-name: org.junit.vintage:junit-vintage-engine
dependency-type: direct:production
update-type: version-update:semver-patch
- dependency-name: org.junit.jupiter:junit-jupiter-params
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* style(lint): ignore MonochromeLauncherIcon check temporarily
* Bump com.android.tools.build:gradle from 7.3.1 to 7.4.1
Bumps com.android.tools.build:gradle from 7.3.1 to 7.4.1.
---
updated-dependencies:
- dependency-name: com.android.tools.build:gradle
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump com.android.tools:desugar_jdk_libs from 1.2.2 to 2.0.2
Bumps [com.android.tools:desugar_jdk_libs](https://github.com/google/desugar_jdk_libs ) from 1.2.2 to 2.0.2.
- [Release notes](https://github.com/google/desugar_jdk_libs/releases )
- [Changelog](https://github.com/google/desugar_jdk_libs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/google/desugar_jdk_libs/commits )
---
updated-dependencies:
- dependency-name: com.android.tools:desugar_jdk_libs
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-06 08:32:59 -05:00
David Allison
eff667b0fb
lint: enable "CheckResult"
...
Kotlin doesn't handle CheckResult by default
2022-07-06 10:57:01 +01:00
David Allison
f1738e62a9
fix: remove duplicate "TextFields" lint
...
Added in edaf6febd0
Forgot to remove the 'ignore'
2022-07-04 15:57:40 +03:00
lukstbit
e0ba632e13
Enable DrawAllocation lint check
2022-06-25 16:41:02 -05:00
David Allison
16bcb1bc5d
fix: Ensure Robolectric's super.setUp() is called
...
Adds in lint check and fixes error message. The lint check enforces
`super.method` if a method is annotated with `@CallSuper`
Previous Error was:
```
java.lang.UnsatisfiedLinkError: 'long net.ankiweb.rsdroid.NativeMethods.openBackend(byte[])'
at net.ankiweb.rsdroid.NativeMethods.openBackend(Native Method)
...
```
The `Error` is only thrown in the case that Robolectric is used
https://developer.android.com/reference/androidx/annotation/CallSuper
2022-06-16 19:56:54 +01:00
lukstbit
6369461b52
Enable MergeRootFrame lint check as fatal for project
2022-06-05 15:00:35 -05:00
lukstbit
2e8380a8de
Enable ObsoleteSdkInt lint check
...
Fix found issues triggered by new check
2022-03-29 14:59:43 -05:00
Manjot Singh Oberoi
ac708229c2
Enabled UselessParent Lint ( #10490 )
2022-03-18 16:59:45 -05:00
Prince kushwaha
ae6985a25f
enable_implictSamInstance_lint
2022-03-18 16:28:28 -05:00
Prince kushwaha
7af404b703
enable-redundantNamespace-lint
2022-03-18 16:26:32 -05:00
Anam Ansari
dbe04e41a5
Enabled lint check "ObsoleteLayoutParam" ( #10498 )
2022-03-15 12:03:46 -05:00
Prince kushwaha
edaf6febd0
Enable TextFields lint ( #10506 )
...
* Enable TextFields lint
* add break line
* fix issue
2022-03-14 10:00:46 -05:00
Prince kushwaha
29b8a3a88d
Enable LogConditional lint
2022-03-13 15:04:10 +05:30
Mike Hardy
6260cd6e25
build(deps): bump android gradle plugin to 7.1
...
- bcprov gradle.properties setting no longer needed, fix released in AGP7.1
- androidx.core resolution strategy no longer needed (actually was in fragment 1.4)
- opt in to api component publishing new regime to quiet warning
- disable certain lints that were not providing value or are already tracked
2022-01-26 15:01:40 -05:00
Mike Hardy
3fcfcc9957
Dependency updates 20211118 ( #9932 )
...
* build(deps): bump material-tap-target-prompt from 3.3.0 to 3.3.1
Bumps [material-tap-target-prompt](https://github.com/sjwall/MaterialTapTargetPrompt ) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/sjwall/MaterialTapTargetPrompt/releases )
- [Changelog](https://github.com/sjwall/MaterialTapTargetPrompt/blob/master/CHANGELOG.md )
- [Commits](https://github.com/sjwall/MaterialTapTargetPrompt/compare/v3.3.0...v3.3.1 )
---
updated-dependencies:
- dependency-name: uk.co.samuelwall:material-tap-target-prompt
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump material-tap-target-prompt from 3.3.1 to 3.3.2
Bumps [material-tap-target-prompt](https://github.com/sjwall/MaterialTapTargetPrompt ) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/sjwall/MaterialTapTargetPrompt/releases )
- [Changelog](https://github.com/sjwall/MaterialTapTargetPrompt/blob/master/CHANGELOG.md )
- [Commits](https://github.com/sjwall/MaterialTapTargetPrompt/compare/v3.3.1...v3.3.2 )
---
updated-dependencies:
- dependency-name: uk.co.samuelwall:material-tap-target-prompt
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump annotations from 22.0.0 to 23.0.0 (#9869 )
* Bump annotations from 22.0.0 to 23.0.0
Bumps [annotations](https://github.com/JetBrains/java-annotations ) from 22.0.0 to 23.0.0.
- [Release notes](https://github.com/JetBrains/java-annotations/releases )
- [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md )
- [Commits](https://github.com/JetBrains/java-annotations/compare/22.0.0...23.0.0 )
---
updated-dependencies:
- dependency-name: org.jetbrains:annotations
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump robolectric from 4.6.1 to 4.7
Bumps [robolectric](https://github.com/robolectric/robolectric ) from 4.6.1 to 4.7.
- [Release notes](https://github.com/robolectric/robolectric/releases )
- [Commits](https://github.com/robolectric/robolectric/compare/robolectric-4.6.1...robolectric-4.7 )
---
updated-dependencies:
- dependency-name: org.robolectric:robolectric
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* fix(test): Kotlin 1.6 requires exhaustive `when`, fix TagsDialogTest
* Bump kotlin_version from 1.5.31 to 1.6.0
Bumps `kotlin_version` from 1.5.31 to 1.6.0.
Updates `kotlin-gradle-plugin` from 1.5.31 to 1.6.0
- [Release notes](https://github.com/JetBrains/kotlin/releases )
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md )
- [Commits](https://github.com/JetBrains/kotlin/commits )
Updates `kotlin-stdlib` from 1.5.31 to 1.6.0
- [Release notes](https://github.com/JetBrains/kotlin/releases )
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md )
- [Commits](https://github.com/JetBrains/kotlin/commits )
Updates `kotlin-stdlib-jdk7` from 1.5.31 to 1.6.0
- [Release notes](https://github.com/JetBrains/kotlin/releases )
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md )
- [Commits](https://github.com/JetBrains/kotlin/commits )
Updates `kotlin-reflect` from 1.5.31 to 1.6.0
- [Release notes](https://github.com/JetBrains/kotlin/releases )
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md )
- [Commits](https://github.com/JetBrains/kotlin/commits )
---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
dependency-type: direct:production
update-type: version-update:semver-minor
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
dependency-type: direct:production
update-type: version-update:semver-minor
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk7
dependency-type: direct:production
update-type: version-update:semver-minor
- dependency-name: org.jetbrains.kotlin:kotlin-reflect
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump robolectric from 4.7 to 4.7.1
Bumps [robolectric](https://github.com/robolectric/robolectric ) from 4.7 to 4.7.1.
- [Release notes](https://github.com/robolectric/robolectric/releases )
- [Commits](https://github.com/robolectric/robolectric/compare/robolectric-4.7...robolectric-4.7.1 )
---
updated-dependencies:
- dependency-name: org.robolectric:robolectric
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump appcompat from 1.3.1 to 1.4.0
fix: androidx.appcompat.resources.R.layout no longer exists
Bumps appcompat from 1.3.1 to 1.4.0.
---
updated-dependencies:
- dependency-name: androidx.appcompat:appcompat
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* fix(lint): add copyright
* Bump fragment-ktx from 1.3.6 to 1.4.0
Bumps fragment-ktx from 1.3.6 to 1.4.0.
Note: https://issuetracker.google.com/issues/206855622 requires ignoring ObsoleteLintCustomCheck for now
---
updated-dependencies:
- dependency-name: androidx.fragment:fragment-ktx
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump fragment-testing from 1.3.6 to 1.4.0
Bumps fragment-testing from 1.3.6 to 1.4.0.
---
updated-dependencies:
- dependency-name: androidx.fragment:fragment-testing
dependency-type: direct:production
update-type: version-update:semver-minor
...
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-1@users.noreply.github.com>
2021-11-18 19:33:55 -05:00
Mike Hardy
0d9df62371
style(lint, Timber): lint issues with Timber solved in current release
...
remove lint rule ignore, remove comments, fix up entropic lint violations that crept
in while lint rules were disabled
2021-10-18 23:48:24 +01:00
David Allison
848b3a862a
nf: add layout for multiline spinners
2021-08-24 16:53:36 -05:00
David Allison
29940962c7
feat: change edit text color if disabled
...
Darkens/lightens the text if a field is disabled
usage:
android:textColor="@drawable/edit_text_color_enabled_selector"
tested on all 4 themes
2021-08-24 16:53:36 -05:00
David Allison
b392f10618
API: Handle lint checks from AnkiDroid only libs
...
The API project used the same lint checks as AnkiDroid,
this failed, as "BinaryOperationInTimber" was defined but
Timber wasn't included in the project.
Related: AGP 7 upgrade: 9338
2021-07-31 14:58:53 -05:00
David Allison
0a696b1b51
lint: ignore all Timber checks
...
Timber Lint is currently incompatible with AGP 7
See: https://github.com/JakeWharton/timber/issues/408
Related: 9338
2021-07-31 14:58:53 -05:00
David Allison
498fa1738d
add (ignore) new lint warnings in new AGP
...
* CustomX509TrustManager
* NotifyDataSetChanged
2021-07-31 09:15:04 -05:00
Mike Hardy
f7646a8552
lint: UnknownId promoted to fatal after eliminating all instances
2021-05-25 14:10:15 -05:00
Mike Hardy
0e83a305d0
lint: remove unknown issues from lint.xml
...
These were trigging "UnknownIssueId" lint warnings because they
are no longer valid lint issues
2021-05-25 14:10:15 -05:00
Tarekk Mohamed Abdalla
8228f60070
lint: enable rtl lint rules
...
RtlSymmetry is disabled because we already have RtlHardcoded rule enabled
2021-04-15 22:47:24 -05:00
David Allison
8ea9640cb4
Enable "HardcodedText" lint warning
...
Ensures issue 7758 won't happen again
2020-11-22 17:44:29 -05:00
David Allison
794757e8e5
Enable lint: UnusedResources
...
Fixes 7571
2020-10-30 13:56:19 -05:00
David Allison
0b14f5eb1f
NF: Ignore translated files for 'UnusedResources'
...
Related 7571
2020-10-30 13:56:19 -05:00
David Allison
029991ad73
NF: Ignore dont translate file from being unused
...
Related 7571
2020-10-30 13:56:19 -05:00
David Allison
adbc7371cd
NF: Mark multimedia icons for later use
...
To be used in the dropdown for issue 7526
Related 7571
2020-10-30 07:55:35 -05:00
David Allison
306a1168f7
Converted translation issues into lint errors
...
Fixes root cause of 5026
2020-09-04 13:23:59 -05:00
David Allison
d340fb37c2
LINT: Fix & Enable 'WrongConstant'
...
Related: 5026
2020-09-02 18:20:47 +02: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