Merge "rust: fully disable all lints when no_lint is set"
This commit is contained in:
commit
95647739aa
|
@ -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...)
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue