Skip to content

Commit 0665b8a

Browse files
Allow missing ANDROID_HOME when running tests (#481)
1 parent a697f7f commit 0665b8a

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

.github/CONTRIBUTING.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ The primary project is `slack-lint`.
99

1010
Kotlin should be used for more idiomatic use with lint APIs.
1111

12-
## Setup
13-
14-
Be sure your devel environment has `ANDROID_HOME` defined or you'll have trouble running tests
15-
that require the Android SDK. If you've added it and still seeing the error about not having it
16-
defined while running tests, try closing and re-opening Android Studio.
17-
1812
## Lint Documentation
1913

2014
[The Android Lint API Guide](https://googlesamples.github.io/android-custom-lint-rules/book.html) provides an excellent overview of lint's purpose, how it works, and how to author custom checks.

compose-lint-checks/src/test/java/slack/lint/compose/BaseComposeLintTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ abstract class BaseComposeLintTest : LintDetectorTest() {
112112

113113
override fun lint(): TestLintTask {
114114
val lintTask = super.lint()
115-
lintTask.allowCompilationErrors(false)
115+
lintTask.allowCompilationErrors(false).allowMissingSdk(true)
116116

117117
skipTestModes?.let { testModesToSkip -> lintTask.skipTestModes(*testModesToSkip) }
118118
return lintTask

0 commit comments

Comments
 (0)