Skip to content

Commit

Permalink
Remove lint.sh; re-add 'make fmt'
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
golangci-lint which requires whole packages to work.

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

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

lintcheck:
golangci-lint run ./...

fmt:
# 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"
golangci-lint run --enable-only="gofmt,gofumpt,goimports" --fix ./...

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

Expand Down Expand Up @@ -39,4 +46,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 c36b0d6

Please sign in to comment.