cwa-app-android
cwa-app-android copied to clipboard
Fix issues reported by gradlew lint
Describe the bug
The Android build system provides an integrated toolset to check for common problems in the source code, like bad coding patterns, code duplication, stability issues, and so on.
The test can be run with the command gradlew lint executed in the project root dir. It creates a report file named Corona-Warn-App/build/reports/lint-results.html (there will be also an XML to be used by automated analysis tools.
Currently the linter shows 829 warnings (state of today, related to release tag 1.0.2)
Expected behaviour
No more lint warnings.
All problems either resolved (better), or at least excluded with a descriptive comment, why the pattern causing the lint warning is necessary (if nothing else works).
Lint warnings can be suppressed in the latter case, see also http://tools.android.com/tips/lint/suppressing-lint-warnings
Google provides the lint checks for good reason, it it will also help to bring down the overall APK size and improve the performance.
Steps to reproduce the issue
lint report screen (it is not possibile to attach the full html, see instructions above how to generate it)

Internal Tracking ID: EXPOSUREAPP-2959
I noticed the same when running Android Studio's Analyze -> Inspect code functionality (which includes the results from lint):

Are you interested in PRs fixing these issues? Note that some maintainer might need to be ready to answer questions/make decisions, since many of the findings might as well be fixed by disabling the according rule since it does not fit the code style etc. used by this project.
Thanks anyways for doing such a great work, and to being that open to suggestions!
Not planned