generated from reviewdog/action-template
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from reviewdog/init
Implement action-staticcheck
- Loading branch information
Showing
10 changed files
with
79 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
FROM alpine:3.11 | ||
FROM golang:1.14-alpine | ||
|
||
ENV REVIEWDOG_VERSION=v0.10.0 | ||
ENV TMPL_VERSION=v1.2.0 | ||
|
||
SHELL ["/bin/ash", "-eo", "pipefail", "-c"] | ||
|
||
# hadolint ignore=DL3006 | ||
RUN apk --no-cache add git | ||
|
||
RUN wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b /usr/local/bin/ ${REVIEWDOG_VERSION} | ||
RUN wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b /usr/local/bin/ ${REVIEWDOG_VERSION} && \ | ||
wget -O - -q https://raw.githubusercontent.com/haya14busa/tmpl/master/install.sh| sh -s -- -b /usr/local/bin/ ${TMPL_VERSION} | ||
|
||
# TODO: Install a linter and/or change docker image as you need. | ||
RUN wget -O - -q https://git.io/misspell | sh -s -- -b /usr/local/bin/ | ||
RUN go get honnef.co/go/tools/cmd/staticcheck | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
COPY json.tmpl /json.tmpl | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{{ range $_, $jl := . -}} | ||
{{ $jl.location.file }}:{{ $jl.location.line }}:{{ $jl.location.column }}:{{ sp -}} | ||
{{ $jl.message }}{{ sp -}} | ||
[{{ $jl.code }}](https://staticcheck.io/docs/checks#{{ $jl.code }}) | ||
{{- nl -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{"code":"U1000","severity":"error","location":{"file":"/home/haya14busa/src/github.com/reviewdog/action-staticcheck/testdata/testdata.go","line":8,"column":6},"end":{"file":"","line":0,"column":0},"message":"func unused is unused"} | ||
{"code":"SA9003","severity":"error","location":{"file":"/home/haya14busa/src/github.com/reviewdog/action-staticcheck/testdata/testdata.go","line":11,"column":2},"end":{"file":"/home/haya14busa/src/github.com/reviewdog/action-staticcheck/testdata/testdata.go","line":11,"column":43},"message":"empty branch"} | ||
{"code":"SA4000","severity":"error","location":{"file":"/home/haya14busa/src/github.com/reviewdog/action-staticcheck/testdata/testdata.go","line":11,"column":5},"end":{"file":"/home/haya14busa/src/github.com/reviewdog/action-staticcheck/testdata/testdata.go","line":11,"column":43},"message":"identical expressions on the left and right side of the '==' operator"} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package testdata | ||
|
||
import ( | ||
"errors" | ||
"regexp" | ||
) | ||
|
||
const ( | ||
First byte = 1 | ||
Second = 2 | ||
) | ||
|
||
func unused() { | ||
regexp.Compile(".+") | ||
|
||
if errors.New("abc") == errors.New("abc") { | ||
// test SA4000 | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.