Merge "Add SOONG_DISABLE_CLIPPY environment variable" into main am: 24627096c1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3265483 Change-Id: Ic5e3829598b7f0a6ade7a9b9371dee804395098a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -38,11 +38,14 @@ func (c *clippy) props() []interface{} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *clippy) flags(ctx ModuleContext, flags Flags, deps PathDeps) (Flags, PathDeps) {
|
func (c *clippy) flags(ctx ModuleContext, flags Flags, deps PathDeps) (Flags, PathDeps) {
|
||||||
enabled, lints, err := config.ClippyLintsForDir(ctx.ModuleDir(), c.Properties.Clippy_lints)
|
dirEnabled, lints, err := config.ClippyLintsForDir(ctx.ModuleDir(), c.Properties.Clippy_lints)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.PropertyErrorf("clippy_lints", err.Error())
|
ctx.PropertyErrorf("clippy_lints", err.Error())
|
||||||
}
|
}
|
||||||
flags.Clippy = enabled
|
|
||||||
|
envDisable := ctx.Config().IsEnvTrue("SOONG_DISABLE_CLIPPY")
|
||||||
|
|
||||||
|
flags.Clippy = dirEnabled && !envDisable
|
||||||
flags.ClippyFlags = append(flags.ClippyFlags, lints)
|
flags.ClippyFlags = append(flags.ClippyFlags, lints)
|
||||||
return flags, deps
|
return flags, deps
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user