Skip to content

Commit

Permalink
Remove lint.sh; re-add 'make fmt' (#2113)
Browse files Browse the repository at this point in the history
See Makefile for explanation on difference between 'make fmt' and 'make
lint'.

I also removed lint.sh. Original motivation was to use it in aider, but
it's not a good fit there, because aider passes filenames and it does
not work well with most golang linters which requires whole packages to
work.

Follow up to #2062, #2056, #2051.
  • Loading branch information
denik authored Jan 10, 2025
1 parent 72e833a commit 75cd582
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ PACKAGES=./acceptance/... ./libs/... ./internal/... ./cmd/... ./bundle/... .
GOTESTSUM_FORMAT ?= pkgname-and-test-fails

lint:
./lint.sh ./...
golangci-lint run --fix

lintcheck:
golangci-lint run ./...

# Note 'make lint' will do formatting as well. However, if there are compilation errors,
# formatting/goimports will not be applied by 'make lint'. However, it will be applied by 'make fmt'.
# If you need to ensure that formatting & imports are always fixed, do "make fmt lint"
fmt:
golangci-lint run --enable-only="gofmt,gofumpt,goimports" --fix ./...

test:
gotestsum --format ${GOTESTSUM_FORMAT} --no-summary=skipped -- ${PACKAGES}

Expand Down Expand Up @@ -39,4 +45,4 @@ integration:
integration-short:
$(INTEGRATION) -short

.PHONY: lint lintcheck test cover showcover build snapshot vendor schema integration integration-short
.PHONY: lint lintcheck fmt test cover showcover build snapshot vendor schema integration integration-short
14 changes: 0 additions & 14 deletions lint.sh

This file was deleted.

0 comments on commit 75cd582

Please sign in to comment.