From 375acd8defc87e9fdf7a29b9435a550d59fb3203 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Thu, 2 May 2024 12:44:20 +0100 Subject: [PATCH] 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 --- java/lint.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/lint.go b/java/lint.go index 31e7f353d..82fac91cf 100644 --- a/java/lint.go +++ b/java/lint.go @@ -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 }