Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3c97e2a authored by Thiébaud Weksteen's avatar Thiébaud Weksteen Committed by Automerger Merge Worker
Browse files

Merge "rust: fully disable all lints when no_lint is set" am: 95647739

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1393998

Change-Id: Ibec9e18f34bf08b31cf08d2ed8a140e5336186ee
parents 46b6b40c 95647739
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -159,7 +159,9 @@ func (compiler *baseCompiler) featuresToFlags(features []string) []string {

func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flags {

	if !Bool(compiler.Properties.No_lint) {
	if Bool(compiler.Properties.No_lint) {
		flags.RustFlags = append(flags.RustFlags, config.AllowAllLints)
	} else {
		flags.RustFlags = append(flags.RustFlags, config.RustcLintsForDir(ctx.ModuleDir()))
	}
	flags.RustFlags = append(flags.RustFlags, compiler.Properties.Flags...)
+1 −0
Original line number Diff line number Diff line
@@ -128,6 +128,7 @@ var DefaultLocalClippyChecks = []PathBasedClippyConfig{
	{"vendor/google", rustcDefault, true, clippyDefault},
	{"vendor/", rustcVendor, true, clippyVendor},
}
var AllowAllLints = rustcAllowAll

// ClippyLintsForDir returns a boolean if Clippy should be executed and if so, the lints to be used.
func ClippyLintsForDir(dir string) (bool, string) {