Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,16 @@ ifneq ($(SKIP_TESTS), 1)
@hack/lint.sh
endif

lint-fix:
ifneq ($(SKIP_TESTS), 1)
@$(MAKE) shell CMD="-c 'hack/lint.sh fix'"
endif

local-lint-fix:
ifneq ($(SKIP_TESTS), 1)
@hack/lint.sh fix
endif

update:
@$(MAKE) shell CMD="-c 'hack/update-all.sh'"

Expand Down
6 changes: 6 additions & 0 deletions hack/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ golangci-lint cache status
# Enable GL_DEBUG line below for debug messages for golangci-lint
# export GL_DEBUG=loader,gocritic,env
CMD="golangci-lint run"

# Add --fix flag if first argument is "fix"
if [ "$1" = "fix" ]; then
CMD="$CMD --fix"
fi

echo "Running $CMD"

eval $CMD
Loading