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

Failed linter on GitHub Actions run does not cause check to fail when fail_on_error is true #949

Open
13 of 27 tasks
Doarakko opened this issue May 15, 2021 · 7 comments · Fixed by reviewdog/action-brakeman#20

Comments

@Doarakko
Copy link
Member

Doarakko commented May 15, 2021

Many repositories need to fix, so please help if you like.

If you could help, it would be helpful if you could comment before starting the work not to overlapping.

Fix example

Run exit command after lint.

echo '::group:: Running golangci-lint with reviewdog 🐶 ...'
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}
exit_code=$?
echo '::endgroup::'

exit $exit_code

reviewdog/action-golangci-lint#77

Todo

I checked the ones that are runnning exit command.

If fail_on_error is not exist in input, please add.

ref: https://github.com/reviewdog/reviewdog#public-reviewdog-github-actions

@Doarakko
Copy link
Member Author

Some repositories seem to fail the check successfully without running exit command.

example

I haven't checked all the repositories yet.

I think it is better to run exit command in a unified manner than to think whether it is necessary to run exit command because it can prevent problems like this one.

At least I'm thinking of adding it to the template repository.
https://github.com/reviewdog/action-template

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 0.001 ETH (2.25 USD @ $2245.09/ETH) attached to it.

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 265 years, 5 months from now.
Please review their action plans below:

1) richcrown619 has started work.

I will to support this project at all cost

Learn more on the Gitcoin Issue Details page.

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 0.001 ETH has been submitted by:


@hisuwh
Copy link

hisuwh commented Jul 22, 2021

What's the state of this one. I have got es-lint errors and am exceeding --max-warnings and reviewdog/action-eslint is not failing my build.

@Djiit
Copy link

Djiit commented Jun 3, 2022

Hi there 👋 stylelint seems to have it, but yet the action is not failing when stylelint fails. Any idea? https://github.com/reviewdog/action-stylelint/blob/master/script.sh#L40

@Doarakko
Copy link
Member Author

Doarakko commented Jun 5, 2022

@Djiit
It worked fine here.
Doarakko/reviewdog-playground#17

Can you share a repository that isn't working properly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants