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

Bump reviewdog to 0.20.2 #132

Open
wants to merge 7 commits into
base: reviewdog
Choose a base branch
from
Open

Conversation

anaxite
Copy link

@anaxite anaxite commented Oct 1, 2024

Update vale-action to use reviewdog 0.20.2:

  • Implement -fail-level option as input fail_level
  • Change main.js/ts flow to only use fail_on_error when fail_on_error is true and fail_level is set to its default.
  • Mark fail_on_error input deprecated, per reviewdog documentation.
  • Update repo's main GitHub workflow to use fail_level
  • Update repo's main GitHub workflow to use actions/checkout@v4

Resolves #131

@anaxite anaxite marked this pull request as ready for review October 9, 2024 19:04
Copy link

@SMoraisAnsys SMoraisAnsys left a comment

Choose a reason for hiding this comment

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

@anaxite I just had some time to work on #131 I'm glad you took the lead to work on this.
The changes allow both old behavior to coexist (fail_on_error and fail_level) so it's great.
I left a minor comment to make the changes working with "any" as level.
@jdkato Do you think it would be better to remove the compatibility with fail_on_error or is this approach also to your liking ?

Comment on lines +94 to +96
`-level=${vale_code == 1 && (should_fail_on_level === 'error' ||
should_fail_on_level === 'warning' ||
should_fail_on_level === 'info') ? should_fail_on_level : 'info'}`

Choose a reason for hiding this comment

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

Suggested change
`-level=${vale_code == 1 && (should_fail_on_level === 'error' ||
should_fail_on_level === 'warning' ||
should_fail_on_level === 'info') ? should_fail_on_level : 'info'}`
`-level=${vale_code == 1 && (should_fail_on_level === 'error' ||
should_fail_on_level === 'warning' ||
should_fail_on_level === 'info') ? should_fail_on_level : 'info'}`

I'm not sure there is a need to check should_fail_on_level value. If that's the case, you might need to add 'any' to be aligned with expected values. I don't think that other cases should be handled ('default' and 'none') since these cases don't make reviewdog exit with 1 (see https://github.com/reviewdog/reviewdog/blob/c53f10c90a146a361c50fe148a78970873ba40ad/fail_level.go#L67)

`-reporter=${core.getInput('reporter')}`,
`-fail-level=${should_fail_on_level}`,
`-filter-mode=${core.getInput('filter_mode')}`,
`-level=${vale_code == 1 && (should_fail_on_level === 'error' ||

Choose a reason for hiding this comment

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

Same comment as the previous one.

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

Successfully merging this pull request may close these issues.

Bump reviewdog version to 0.20.1
2 participants