Skip to content
Open
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
11 changes: 10 additions & 1 deletion go-critic.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
#!/usr/bin/env bash
cmd=(go-critic check)

# Default to newer name
# If not found, but old name found, us it

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor typo I noticed while reviewing.

Suggested change
# If not found, but old name found, us it
# If not found, but old name found, use it

# If neither found, leave newer for error reporting
gocritic_bin='go-critic'
if ! command -v go-critic &> /dev/null && command -v gocritic &> /dev/null; then
gocritic_bin='gocritic'
fi

cmd=("${gocritic_bin}" check)
. "$(dirname "${0}")/lib/cmd-files.bash"