Skip to content
16 changes: 1 addition & 15 deletions cmd/api-linter/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,21 +165,7 @@ func (c *cli) lint(rules lint.RuleRegistry, configs lint.Configs) error {
},
}
// Resolve file absolute paths to relative ones.
// Using supplied import paths first.
protoFiles := c.ProtoFiles
if len(c.ProtoImportPaths) > 0 {
protoFiles, err = protoparse.ResolveFilenames(c.ProtoImportPaths, c.ProtoFiles...)
if err != nil {
return err
}
}
// Then resolve again against ".", the local directory.
// This is necessary because ResolveFilenames won't resolve a path if it
// relative to *at least one* of the given import paths, which can result
// in duplicate file parsing and compilation errors, as seen in #1465 and
// #1471. So we resolve against local (default) and flag specified import
// paths separately.
protoFiles, err = protoparse.ResolveFilenames([]string{"."}, protoFiles...)
protoFiles, err := protoparse.ResolveFilenames(p.ImportPaths, c.ProtoFiles...)
if err != nil {
return err
}
Expand Down
3 changes: 0 additions & 3 deletions cmd/api-linter/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,6 @@ func TestMultipleFilesFromParentDir(t *testing.T) {
// This test addresses a previously found bug:
// https://github.com/googleapis/api-linter/issues/1465

// Skipping until Issue # 1465 is addressed
t.Skip("Skipping until Issue # 1465 is addressed")

projDir, err := os.MkdirTemp("", "proj")
if err != nil {
t.Fatal(err)
Expand Down