-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Support related locations #55
Changes from 5 commits
6edaf72
ad7ea01
5d4d6a7
e1c729d
97409ba
9a21890
081d68c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,17 +7,13 @@ | |
PATH="${TEMP_PATH}:$PATH" | ||
export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}" | ||
|
||
echo '::group::🐶 Installing reviewdog ... https://github.com/reviewdog/reviewdog' | ||
curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b "${TEMP_PATH}" "${REVIEWDOG_VERSION}" 2>&1 | ||
echo '::endgroup::' | ||
|
||
echo '::group:: Installing staticcheck ... https://staticcheck.io' | ||
curl -sfL "https://github.com/dominikh/go-tools/releases/latest/download/staticcheck_linux_amd64.tar.gz" | tar -xvz -C "${TEMP_PATH}" --strip-components=1 | ||
echo '::endgroup::' | ||
|
||
|
||
echo '::group:: Running staticcheck with reviewdog 🐶 ...' | ||
staticcheck ${INPUT_STATICCHECK_FLAGS} -f=json ${INPUT_TARGET:-.} \ | ||
Check warning on line 16 in script.sh
|
||
| jq -f "${GITHUB_ACTION_PATH}/to-rdjsonl.jq" -c | \ | ||
reviewdog \ | ||
-f="rdjsonl" \ | ||
|
@@ -26,7 +22,7 @@ | |
-filter-mode="${INPUT_FILTER_MODE}" \ | ||
-fail-on-error="${INPUT_FAIL_ON_ERROR}" \ | ||
-level="${INPUT_LEVEL}" \ | ||
${INPUT_REVIEWDOG_FLAGS} | ||
Check warning on line 25 in script.sh
|
||
|
||
exit_code=$? | ||
echo '::endgroup::' | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -7,23 +7,29 @@ | |||||||||||
) | ||||||||||||
|
||||||||||||
const ( | ||||||||||||
First byte = 1 | ||||||||||||
Check failure on line 10 in testdata/testdata.go
|
||||||||||||
Second = 2 | ||||||||||||
) | ||||||||||||
|
||||||||||||
func unused() { | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||||||
regexp.Compile(".+") | ||||||||||||
|
||||||||||||
nonNilVar := []int{} | ||||||||||||
|
||||||||||||
if errors.New("abcd") == errors.New("abcd") { | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||||||
// Test SA4000 | ||||||||||||
} | ||||||||||||
|
||||||||||||
regexp.Compile(".\\") | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||||||
|
||||||||||||
s := []string{} | ||||||||||||
if s != nil { | ||||||||||||
if s != nil { // test | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [staticcheck] <SA4031> reported by reviewdog 🐶 this is the value of s action-staticcheck/testdata/testdata.go Line 23 in 5d4d6a7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [staticcheck] <SA4031> reported by reviewdog 🐶 this is the value of s action-staticcheck/testdata/testdata.go Line 15 in d5c274f
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [staticcheck] <SA4031> reported by reviewdog 🐶 this is the value of s action-staticcheck/testdata/testdata.go Line 25 in e1c729d
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [staticcheck] <SA4031> reported by reviewdog 🐶 this is the value of s action-staticcheck/testdata/testdata.go Line 25 in 97409ba
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [staticcheck] <SA4031> reported by reviewdog 🐶 this is the value of s action-staticcheck/testdata/testdata.go Line 25 in 9a21890
|
||||||||||||
for _, x := range s { | ||||||||||||
fmt.Println(x) | ||||||||||||
} | ||||||||||||
} | ||||||||||||
|
||||||||||||
if nonNilVar != nil { | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [staticcheck] <SA4031> reported by reviewdog 🐶 this is the value of nonNilVar action-staticcheck/testdata/testdata.go Line 17 in e1c729d
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [staticcheck] <SA4031> reported by reviewdog 🐶 this is the value of nonNilVar action-staticcheck/testdata/testdata.go Line 17 in 97409ba
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [staticcheck] <SA4031> reported by reviewdog 🐶 this is the value of nonNilVar action-staticcheck/testdata/testdata.go Line 17 in 9a21890
|
||||||||||||
fmt.Println(nonNilVar) | ||||||||||||
} | ||||||||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [staticcheck] <U1000> reported by reviewdog 🐶
func unused is unused