Skip to content

Commit

Permalink
bump linter version
Browse files Browse the repository at this point in the history
  • Loading branch information
ceyonur committed Sep 20, 2023
1 parent 2d513e2 commit b8e4145
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ fi
TESTS=${TESTS:-"golangci_lint"}

function test_golangci_lint {
go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@v1.49.0
go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2
golangci-lint run --config .golangci.yml
}

# find_go_files [package]
# all go files except generated ones
function find_go_files {
local target="${1}"
go fmt -n "${target}" | grep -Eo "([^ ]*)$" | grep -vE "(\\.pb\\.go|\\.pb\\.gw.go)"
go fmt -n "${target}" | grep -Eo "([^ ]*)$" | grep -vE "(\\.pb\\.go|\\.pb\\.gw.go)"
}

function run {
local test="${1}"
shift 1
echo "START: '${test}' at $(date)"
if "test_${test}" "$@" ; then
if "test_${test}" "$@"; then
echo "SUCCESS: '${test}' completed at $(date)"
else
echo "FAIL: '${test}' failed at $(date)"
Expand Down

0 comments on commit b8e4145

Please sign in to comment.