0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 12:02:16 +02:00
Commit Graph

32 Commits

Author SHA1 Message Date
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