Configuration¶
Most assertk-lint checks are enabled by default. A few aren't — the "competing library" detectors are opt-in so the plugin doesn't second-guess projects that ship multiple assertion libraries on purpose.
Opt-in checks¶
| Issue ID | Default |
|---|---|
AssertJUse |
off |
GoogleTruthUse |
off |
Enable them through your project's lint.xml (or via the Lint DSL):
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="AssertJUse" severity="warning" />
<issue id="GoogleTruthUse" severity="warning" />
</lint>
Promoting warnings to errors¶
If you want, say, TestFrameworkAssertionUse to fail the build instead of
warning:
Or with the DSL:
Disabling a check¶
Disable a single check the same way:
You can also suppress at the call site with @Suppress("EqualityComparisonAssertion")
or, more idiomatically for Lint, @SuppressLint("EqualityComparisonAssertion").
Running¶
Reports land in build/reports/lint-results-*.html (and .xml). The HTML
report deep-links to each check's documentation.
All issue IDs
See the Checks overview for the full list of issue IDs, severities, and defaults.