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

Commit 375acd8d authored by Paul Duffin's avatar Paul Duffin
Browse files

Correct lint error when it cannot find api_versions_* module

Also, fixes the error when it cannot find a module containing the
`annotations.zip` file.

Bug: 336993217
Test: change `apiVersionsModule` setting in `lint.go` to refer to
      a non-existent module and then run `m nothing` to see the
      error message correctly lists the module name.
Change-Id: I84a9e241d1c3bedebc26e119bd4b9861664c43c1
parent 364740b4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -612,7 +612,7 @@ func (l *lintSingleton) copyLintDependencies(ctx android.SingletonContext) {
		apiVersionsDb := findModuleOrErr(ctx, files.apiVersionsModule)
		if apiVersionsDb == nil {
			if !ctx.Config().AllowMissingDependencies() {
				ctx.Errorf("lint: missing module api_versions_public")
				ctx.Errorf("lint: missing module %s", files.apiVersionsModule)
			}
			return
		}
@@ -620,7 +620,7 @@ func (l *lintSingleton) copyLintDependencies(ctx android.SingletonContext) {
		sdkAnnotations := findModuleOrErr(ctx, files.annotationsModule)
		if sdkAnnotations == nil {
			if !ctx.Config().AllowMissingDependencies() {
				ctx.Errorf("lint: missing module sdk-annotations.zip")
				ctx.Errorf("lint: missing module %s", files.annotationsModule)
			}
			return
		}