Skip to content

Commit

Permalink
scope lint
Browse files Browse the repository at this point in the history
  • Loading branch information
blampe committed Oct 24, 2024
1 parent e9e1432 commit 2725579
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ fmt::
@gofmt -w -s .

lint:
go run scripts/build.go lint
golangci-lint run github.com/pulumi/pulumi-terraform-bridge/v3

lint_fix:
go run scripts/build.go fix-lint
golangci-lint run --fix github.com/pulumi/pulumi-terraform-bridge/v3

test:: install_plugins
@mkdir -p bin
Expand Down
24 changes: 8 additions & 16 deletions scripts/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,23 +143,15 @@ func execCommandOrLogFatal(cwd, name string, arg ...string) {

// Finds directories containing go.mod files in the repository.
func findGoModuleRoots() (result []string) {
var buf bytes.Buffer
cmd := exec.Command("git", "ls-files", "-z", "**go.mod")
cmd.Dir = "."
cmd.Stderr = os.Stderr
cmd.Stdout = &buf
if err := cmd.Run(); err != nil {
log.Fatal(err)
}
ms := strings.Split(buf.String(), string(rune(0)))
for _, m := range ms {
if m == "" {
continue
}
d := filepath.Dir(m)
result = append(result, d)
// Please **don't** add additional modules here.
return []string{
"go.mod",
"tools/go.mod",
"dynamic/go.mod",
"dynamic/test/pfprovider/go.mod",
"dynamic/internal/shim/go.mod",
"pkg/pf/tests/testdatagen/genrandom/go.mod",
}
return result
}

func latestPulumiVersion() string {
Expand Down

0 comments on commit 2725579

Please sign in to comment.