rust: modify linting properties

Move the linting properties to an enum with 4 possible options:
"default", "android", "vendor" or "none". The previous logic for
default, based on the module's location, is kept. It is now possible to
force the upgrade to a certain lint level for some modules (e.g.
external/[...]/android). Update the unit tests and documentation.

Bug: 163400111
Test: m
Change-Id: I8e464b04401158ed2d3c518a9b72f145a9835c99
This commit is contained in:
Thiébaud Weksteen
2020-08-13 12:55:59 +02:00
parent 29737cfc94
commit 9e8451e524
7 changed files with 235 additions and 65 deletions

View File

@@ -73,8 +73,8 @@ func NewSourceProviderModule(hod android.HostOrDeviceSupported, sourceProvider S
module.compiler = library
if !enableLints {
library.setNoLint()
module.setClippy(false)
library.disableLints()
module.disableClippy()
}
return module