Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go/lint: include misspell in golangci-lint enabled linters #225

Merged
merged 1 commit into from
Oct 27, 2021
Merged
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
24 changes: 1 addition & 23 deletions go/lint-project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,28 +75,6 @@ then
fi
fi

# Misspell
if [[ "$OS_NAME" == "linux" ]]; then wget -q -O misspell.tar.gz https://github.com/client9/misspell/releases/download/v0.3.4/misspell_0.3.4_linux_64bit.tar.gz; fi
if [[ "$OS_NAME" == "osx" ]]; then wget -q -O misspell.tar.gz https://github.com/client9/misspell/releases/download/v0.3.4/misspell_0.3.4_mac_64bit.tar.gz; fi
if [[ "$OS_NAME" != "windows" ]]; then
tar xf misspell.tar.gz
cp ./misspell ./bin/misspell
echo "misspell version: "$(./bin/misspell -v)

ignore=""
if [ -n "$MISSPELL_IGNORE" ];
then
ignore=$MISSPELL_IGNORE
fi

for file in "${GOFILES[@]}"
do
./bin/misspell -error -locale US -i "$ignore" $file
done

echo "finished misspell check"
fi

# gitleaks
# Right now there are some false positives which make it harder to scan
# See: https://github.com/zricethezav/gitleaks/issues/394
Expand Down Expand Up @@ -167,7 +145,7 @@ fi
if [[ "$OS_NAME" != "windows" ]]; then
wget -q -O - -q https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.42.1

enabled="-E=bodyclose,exhaustive,gocyclo,rowserrcheck"
enabled="-E=bodyclose,exhaustive,gocyclo,misspell,rowserrcheck"
if [ -n "$GOLANGCI_LINTERS" ];
then
enabled="$enabled"",$GOLANGCI_LINTERS"
Expand Down