Commit Graph

39 Commits

Author SHA1 Message Date
Julien Cristau
484a468749 Bug 1825116 - remove trailing whitespace from ConceptFetchDetector and test. r=jonalmeida,mcarare
Differential Revision: https://phabricator.services.mozilla.com/D202734
2024-02-26 18:16:31 +01:00
Jonathan Almeida
5483ea8599 Bug 1881571 - Add tooling-lint component to Fenix 2024-02-29 20:50:43 +00:00
Ryan VanderMeulen
3d59857932 Bug 1882134 - Use jvmToolchain for setting target JVM version 2024-02-27 14:40:20 +00:00
Jonathan Almeida
d41e8939ae Bug 1872235 - Add lint detector for missing Response#close
In bug 1839067, we fixed a multiple cases were streams were
potentially leaking resources. As a follow-up, we are adding a lint
check that now helps to identify possible missing calls to close those
resources.

The implementation is heavily relied on from
[`com.android.tools.lint.checks.CleanupDetector`][0] in the AOSP
project, so little cleanup is done to change the code from it's
original source if we need to reference it later.

Some other references that were quite helpful for this work, were the
[Android Lint API Guide][1] and the examples in the [Data Flow
Analyzer][2].

[0]: https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/CleanupDetector.kt;l=66;drc=042516205eef87810ffe9f6d51ba40b1edbb15b0
[1]: https://googlesamples.github.io/android-custom-lint-rules/api-guide.html
[2]: https://android.googlesource.com/platform/tools/base/+/HEAD/lint/docs/api-guide/dataflow-analyzer.md.html
2024-02-20 18:34:24 +00:00
Geoff Brown
4be4312d42 Bug 1825116 - Resolve many lint issues found on oak (https://github.com/mozilla-mobile/firefox-android/pull/4551)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-11-22 15:17:10 +00:00
mcarare
235c47209f Bug 1849833 - Replace deprecated kotlinOptions method. 2023-09-11 06:36:20 +00:00
mcarare
5a7b24763d Bug 1849833 - Replace qualified name with import. 2023-09-11 06:36:20 +00:00
mcarare
bab9549ff3 Bug 1847776 - Reinstate unit tests after Java and Robolectric upgrades. 2023-08-10 17:04:20 +00:00
mcarare
72f8a6a48b Bug 1831352 - Target Java 17. 2023-06-12 19:40:42 +00:00
mcarare
4d40582169 Bug 1796348 - Implement a lint check to avoid calling notify directly.
All attempts to show a notification should be handled through NotificationDelegate.
2023-03-30 15:04:03 -04:00
mcarare
a1bb298784 Bug 1824052 - Set jvmTarget to 11 for KotlinCompile task in tooling-lint. 2023-03-27 23:00:00 +00:00
Ryan VanderMeulen
0e5e70291c Bug 1820233 - Remove unneeded kotlin_stdlib inclusions and re-enable Werror in detekt build.gradle 2023-03-07 00:12:18 +00:00
mcarare
922b5f6643 Bug 1802817 - Rename AC Dependencies to ComponentsDependencies.
This change is needed in order to avoid clashes with Dependencies class introduced
in Gradle from 7.6 version.
2023-03-02 17:13:09 +00:00
mcarare
0a3ee16557 Bug 1813671 - Target JVM 11 bytecode
See https://developer.android.com/studio/releases/gradle-plugin#jvm-11-bytecode for details.
2023-03-02 17:13:09 +00:00
Gabriel Luong
d9d783b698 [components] Issue https://github.com/mozilla-mobile/android-components/issues/12939: Address all ktlint issues 2022-10-17 17:07:40 -04:00
mcarare
710f4e81fe [components] For https://github.com/mozilla-mobile/android-components/issues/12381: Add mockito and junit dependencies to lint module. 2022-08-31 09:47:47 +00:00
shamilovstas
26bf8bf694 [components] Fixed warnings reported by ktlint (formatting) 2021-10-28 12:42:05 +00:00
shamilovstas
3fce0c40e7 [components] Close https://github.com/mozilla-mobile/android-components/issues/9576 - Add custom lint rule that warns if Fact.collect is not called on a newly created Fact instance 2021-10-28 12:42:05 +00:00
Sebastian Kaspari
ce323400dd [components] Run ktlintFormat to fix new ktlint errors. 2021-07-28 12:03:23 +00:00
Sebastian Kaspari
4863bc3b15 [components] Issue https://github.com/mozilla-mobile/android-components/issues/10335: Use Java 11. 2021-07-15 14:57:23 +00:00
Christian Sadilek
1923446e74 [components] Revert "Issue https://github.com/mozilla-mobile/android-components/issues/10335: Use Java 11."
This reverts commit ad61d7c2f709a0566ea8574450ad34dd185ee22b.
2021-06-10 14:32:47 +00:00
Sebastian Kaspari
a98efdc968 [components] Issue https://github.com/mozilla-mobile/android-components/issues/10335: Use Java 11. 2021-06-10 12:57:18 +00:00
Emilio Cobos Álvarez
41d375b7d9 [components] ktlint: Add missing newlines.
Running ./gradlew ktlint locally reports a lot of stuff like:

/home/emilio/src/moz/android-components/components/support/migration/src/test/java/mozilla/components/support/migration/MigrationIntentProcessorTest.kt:1:1: File must end with a newline (\n)

This fixes it with:

    for f in $(cat files | cut -d : -f 1); do echo "" >> $f; done

Making ./gradlew ktlint pass.
2020-12-03 17:24:44 +00:00
Sebastian Kaspari
e445c6eb58 [components] Update to Gradle 6.1.1, Android Gradle plugin 4.0.1, Kotlin 1.4 and Coroutines 1.3.9.
This patch reintroduces the changes from PR https://github.com/mozilla-mobile/android-components/pull/8360 that we reverted in PR https://github.com/mozilla-mobile/android-components/pull/8623. Now the issues in
Fenix are resolved and we can land this again.
2020-10-19 07:01:53 +00:00
Sebastian Kaspari
9afa3a75f7 [components] Revert Gradle, Android Gradle Plugin and Kotlin upgrade. (PR https://github.com/mozilla-mobile/android-components/pull/8360)
Revert "Address even more lint errors."

This reverts commit e98ee991b34d318e671c644d63daec53902e68ff.

Revert "Update to Gradle 6.6.1."

This reverts commit cdda701c8f2be6c0486ddf1494885accf78aab00.

Revert "Address lint errors."

This reverts commit 26cb5b27bc2be672c89e7e0c63eeeda9f64c0d08.

Revert "Move JNA configuration to root project."

This reverts commit 694ef37cc30e727f3ec5d275c0e9583385980a43.

Revert "Issue https://github.com/mozilla-mobile/android-components/issues/8319: Update to Kotlin 1.4, Coroutines 1.3.9 and Android lint 27.0.1."

This reverts commit ad675c35e794050dbf8514a2d2fe7506ce0c546c.

Revert "Update Glean to 33.0.4."

This reverts commit 4731c4e2fa52d40f4062a47f02078ca0c85de632.

Revert "Update Glean to 33.0.0."

This reverts commit 352cf88a4d4bad64330d0ec997814fd8b13928c2.

Revert "Update Gradle to 6.1.1."

This reverts commit 18e88aa1a2528b10f7d81ff9dbf1df094071b6ce.

Revert "Update Android Gradle Plugin to 4.0.1."

This reverts commit f915a3b47b0f5584889ff62a80c9642bccfa36ce.
2020-10-06 14:57:11 +02:00
Sebastian Kaspari
1142ece2d6 [components] Issue https://github.com/mozilla-mobile/android-components/issues/8319: Update to Kotlin 1.4, Coroutines 1.3.9 and Android lint 27.0.1. 2020-10-02 18:44:27 +00:00
Grisha Kruglov
684e58a1ed [components] For https://github.com/mozilla-mobile/android-components/issues/7034: misc low hanging fruit 2020-05-19 20:05:51 -07:00
ekager
8f2ddae38e [components] Adds lint rule for using android:tint with ImageView 2020-03-02 09:16:14 -08:00
ekager
511ba588ee [components] For https://github.com/mozilla-mobile/android-components/issues/6102 : Add lint checks for using app namespace instead of android for drawables 2020-03-02 09:16:14 -08:00
Sebastian Kaspari
ef9677b6fd [components] Issue https://github.com/mozilla-mobile/android-components/issues/2880: tooling-lint: Create dummy assembleAndroidTest task. 2019-05-29 18:19:40 -04:00
Denys M
3346de8f6f [components] For https://github.com/mozilla-mobile/android-components/issues/2346. Enable kotlin warningsAsErrors for tooling-lint module. 2019-05-28 09:10:00 -04:00
ali-abdullah
89f3263d12 [components] included buildSrc in ktlint and detekt checks 2018-11-16 12:40:04 +01:00
Jonathan Almeida
e3296de94b [components] Update tooling-lint to Java 8 2018-11-08 12:35:26 +01:00
Christian Sadilek
659bb13940 [components] Closes https://github.com/mozilla-mobile/android-components/issues/1058: Lint Log check leaks into embedding applications 2018-10-23 13:16:59 +02:00
Vadim Semenov
2424531ebf [components] Adjust custom lint issue registry 2018-10-15 09:42:36 +02:00
Sebastian Kaspari
946410ca86 [components] Configure dependencies from buildSrc Kotlin code. 2018-08-21 11:16:21 -04:00
Sebastian Kaspari
60e9733dce [components] Closes https://github.com/mozilla-mobile/android-components/issues/553: Add README to tooling-lint module. 2018-08-10 16:45:12 +02:00
Sebastian Kaspari
70bdb5444f [components] Issue https://github.com/mozilla-mobile/android-components/issues/15: tooling-lint: Add empty "lint" task for automation. 2018-08-03 15:22:42 +02:00
Sebastian Kaspari
0f24219759 [components] Issue https://github.com/mozilla-mobile/android-components/issues/15: Add custom lint rule for Log class usage. 2018-08-03 15:22:42 +02:00