Skip to content

Commit

Permalink
go/lint: add xmlencoderclose linter to steps
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdecaf committed Jul 19, 2023
1 parent ff93bb1 commit 20364a4
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions go/lint-project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,44 @@ if [[ "$EXPERIMENTAL" == *"sqlvet"* ]]; then
fi
fi

run_xmlencoderclose=true
if [[ "$DISABLE_XMLENCODERCLOSE" != "" ]]; then
run_xmlencoderclose=false
fi
if [[ "$run_xmlencoderclose" == "true" ]]; then
# Install xmlencoderclose
go install github.com/adamdecaf/xmlencoderclose@latest

# Find the linter
bin=""
if which -s xmlencoderclose > /dev/null;
then
bin=$(which xmlencoderclose 2>&1 | head -n1)
fi
# Public Github runners path
actions_path="/home/runner/go/bin/xmlencoderclose"
if [[ -f "$actions_path" ]];
then
bin="$actions_path"
fi
# Moov hosted runner paths
actions_path="/home/actions/bin/xmlencoderclose"
if [[ -f "$actions_path" ]];
then
bin="$actions_path"
fi

# Run xmlencoderclose
if [[ "$bin" != "" ]];
then
echo "STARTING xmlencoderclose check"
"$bin" -test ./...
echo "FINISHED xmlencoderclose check"
else
echo "Can't find xmlencoderclose..."
fi
fi

# golangci-lint
if [[ "$org" == "moov-io" ]];
then
Expand Down

0 comments on commit 20364a4

Please sign in to comment.