-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Migrate from docker to composite run actions #46
Changes from all commits
87b1920
6e2fb34
a2698fc
ae8a740
8754127
6b20b92
ad4b115
8cbfd90
a346a38
8bdc1f1
8769f60
3b90a2c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
cd "${GITHUB_WORKSPACE}/${INPUT_WORKDIR}" || exit 1 | ||
|
||
TEMP_PATH="$(mktemp -d)" | ||
PATH="${TEMP_PATH}:$PATH" | ||
|
||
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 golangci-lint ... https://github.com/golangci/golangci-lint' | ||
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${TEMP_PATH}" "${GOLANGCI_LINT_VERSION}" 2>&1 | ||
echo '::endgroup::' | ||
|
||
export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}" | ||
|
||
echo '::group:: Running golangci-lint with reviewdog 🐶 ...' | ||
# shellcheck disable=SC2086 | ||
golangci-lint run --out-format line-number ${INPUT_GOLANGCI_LINT_FLAGS} \ | ||
| reviewdog -f=golangci-lint \ | ||
-name="${INPUT_TOOL_NAME}" \ | ||
-reporter="${INPUT_REPORTER:-github-pr-check}" \ | ||
-filter-mode="${INPUT_FILTER_MODE:-added}" \ | ||
-fail-on-error="${INPUT_FAIL_ON_ERROR:-false}" \ | ||
-level="${INPUT_LEVEL}" \ | ||
${INPUT_REVIEWDOG_FLAGS} | ||
echo '::endgroup::' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
package testdata | ||
|
||
import ( | ||
"os" | ||
"fmt" | ||
"os" | ||
) | ||
|
||
func Main( ) { | ||
// langauge | ||
func Main() { | ||
// langauge | ||
|
||
x := 2 | ||
x := 2 | ||
x += 1 | ||
fmt.Sprintf("%d") | ||
|
||
os.Open("main.go") | ||
os.Open("main1.go") | ||
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. [golangci-lint-github-pr-review] reported by reviewdog 🐶 |
||
} | ||
|
||
func unused(unusedParam int) error { | ||
func unused1(unusedParam int) error { | ||
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. [golangci-lint-github-pr-review] reported by reviewdog 🐶 |
||
|
||
return nil | ||
|
||
|
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.
The install script picks the version to install based on the OS, so an ARM-based or Windows-based runner would get the expected version for their system. Nice!