Skip to content

Commit

Permalink
fix(go/lint_fix): do not error on fixed issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tcodes0 committed Sep 14, 2024
1 parent ac7628f commit 547dd38
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion go/lint_fix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,13 @@ lint() {
fatal $LINENO "expected $PWD/$path to be a directory with a go package"
fi

$linter -fix "$PWD/$path"
if ! $linter -fix "$PWD/$path"; then
local status=$?

if [ "$status" -gt 0 ] && [ "$status" != 3 ]; then
fatal $LINENO "$linter $PWD/$path: exit status $status"
fi
fi

if [ -d "$PWD/$path/${path}_test" ]; then
$linter -fix "$PWD/$path/${path}_test"
Expand Down

0 comments on commit 547dd38

Please sign in to comment.