chore: clean up tasks

This commit is contained in:
franklin 2023-02-20 10:09:30 +01:00
parent e1c7ad6f06
commit 902a76b514

View File

@ -2,15 +2,6 @@
## === Tasks ===
.PHONY: act.push
## Run github push action
act.push:
@act
.PHONY: check
## Run tests and linters
check: test lint
.PHONY: test
## Run tests
test:
@ -21,7 +12,7 @@ test:
lint: files=$(shell find . -type f -name go.mod)
lint: dirs=$(foreach file,$(files),$(dir $(file)) )
lint:
@for dir in $(dirs); do cd $$dir && golangci-lint run; done
@for dir in $(dirs); do cd $$dir && pwd && golangci-lint run; done
.PHONY: lint.fix
## Fix lint violations
@ -30,18 +21,6 @@ lint.fix: dirs=$(foreach file,$(files),$(dir $(file)) )
lint.fix:
@for dir in $(dirs); do cd $$dir && golangci-lint run --fix; done
.PHONY: lint.super
## Run super linter
lint.super:
docker run --rm -it \
-e 'RUN_LOCAL=true' \
-e 'DEFAULT_BRANCH=main' \
-e 'IGNORE_GITIGNORED_FILES=true' \
-e 'VALIDATE_JSCPD=false' \
-e 'VALIDATE_GO=false' \
-v $(PWD):/tmp/lint \
github/super-linter
## === Utils ===
.PHONY: gomod
@ -50,9 +29,9 @@ gomod:
go mod tidy
cd example && go mod tidy
.PHONY: outdated
.PHONY: gomod.outdated
## Show outdated direct dependencies
outdated:
gomod.outdated:
go list -u -m -json all | go-mod-outdated -update -direct
## Show help text