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

Add an option "--count-only-error-for-failure" #252

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nhosoi
Copy link

@nhosoi nhosoi commented Dec 9, 2022

Description:
--count-only-error-for-failure
Count only error items, not warning and info, for failure

We have a requirement for a word not to cause a failure when the word has a rule whose severity is warning or info.

Note

As long as the requirement is satisfied, we do not mind how it'd be implemented. So, if my proposal does not fit in the current design, please feel free to close this PR in favor of a better one. Thanks in advance!

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features) see docs/README.md

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

This PR adds an option --count-only-error-for-failure. When this option is given along with --exit-1-on-failure, even if a word whose rule specifies the warning level of severity (or info) is found, it does not exit as a failure.

What is the current behavior? (You can also link to an open issue here)

Regardless of the severity level, any finding makes woke exit with 1 if --exit-1-on-failure is specified.

If you are interested in, this is the PR in which I ran into the issue.
linux-system-roles/logging#307 (comment)

What is the new behavior (if this is a feature change)?

If --count-only-error-for-failure is specified along with --exit-1-on-failure, findings whose rule has the warning or info level of the severity will not cause woke exit with 1.

Does this PR introduce a breaking change? (What changes might users need to make due to this PR?)

Unless --count-only-error-for-failure is specified, there are no behavioral changes.

Description:
  --count-only-error-for-failure
  Count only error items, not warning and info, for failure

We have a requirement for a word not to cause a failure when the
word has a rule whose severity is "warning" or "info".
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

👋 Thanks for submitting your first PR!

Please be sure to read and follow our Code of Conduct and Contributing guide.

⭐️ Is your org or open source project using woke? If so, we'd love for you to be included in the 'Who uses woke' list at https://github.com/get-woke/woke/blob/main/docs/about.md#who-uses-woke.

nhosoi added a commit to nhosoi/woke that referenced this pull request Dec 13, 2022
nhosoi added a commit to nhosoi/woke-action that referenced this pull request Dec 13, 2022
nhosoi added a commit to nhosoi/woke-action that referenced this pull request Dec 13, 2022
nhosoi added a commit to nhosoi/logging that referenced this pull request Dec 15, 2022
Add a check for usage of terms and language that is considered
non-inclusive. We are using the woke tool for this with a wordlist
that can be found at
https://github.com/linux-system-roles/tox-lsr/blob/main/src/tox_lsr/config_files/woke.yml

Note: this commit uses the customized woke placed locally in
.github/actions/custom-woke-action. It will be replaced with
the official woke once get-woke/woke#252
(Add an option "--count-only-error-for-failure") is processed.

CHANGELOG.md - cleanup non-inclusive words.
nhosoi added a commit to nhosoi/certificate that referenced this pull request Dec 15, 2022
Add a check for usage of terms and language that is considered
non-inclusive. We are using the woke tool for this with a wordlist
that can be found at
https://github.com/linux-system-roles/tox-lsr/blob/main/src/tox_lsr/config_files/woke.yml

Note: this commit uses the customized woke placed locally in
.github/actions/custom-woke-action. It will be replaced with
the official woke once get-woke/woke#252
(Add an option "--count-only-error-for-failure") is processed.

CHANGELOG.md - cleanup non-inclusive words.
tests/tasks/setup_ipa.yml - Apply "wokeignore:rule"

Signed-off-by: Noriko Hosoi <nhosoi@redhat.com>
nhosoi added a commit to nhosoi/mssql that referenced this pull request Jan 5, 2023
Add a check for usage of terms and language that is considered
non-inclusive. We are using the woke tool for this with a wordlist
that can be found at
https://github.com/linux-system-roles/tox-lsr/blob/main/src/tox_lsr/config_files/woke.yml

Note: this commit uses the customized woke placed locally in
    .github/actions/custom-woke-action to support an new option
    --count-only-error-for-failure option.
    The local action custom-woke-action will be replaced with
    the official woke once get-woke/woke#252
    (Add an option "--count-only-error-for-failure") is processed.
nhosoi added a commit to nhosoi/mssql that referenced this pull request Jan 5, 2023
Add a check for usage of terms and language that is considered
non-inclusive. We are using the woke tool for this with a wordlist
that can be found at
https://github.com/linux-system-roles/tox-lsr/blob/main/src/tox_lsr/config_files/woke.yml

Note: this commit uses the customized woke placed locally in
    .github/actions/custom-woke-action to support an new option
    --count-only-error-for-failure option.
    The local action custom-woke-action will be replaced with
    the official woke once get-woke/woke#252
    (Add an option "--count-only-error-for-failure") is processed.
nhosoi added a commit to nhosoi/mssql that referenced this pull request Jan 5, 2023
Add a check for usage of terms and language that is considered
non-inclusive. We are using the woke tool for this with a wordlist
that can be found at
https://github.com/linux-system-roles/tox-lsr/blob/main/src/tox_lsr/config_files/woke.yml

Note: this commit uses the customized woke placed locally in
    .github/actions/custom-woke-action to support a new option
    --count-only-error-for-failure option.
    The local action custom-woke-action will be replaced with
    the official woke once get-woke/woke#252
    (Add an option "--count-only-error-for-failure") is processed.

Signed-off-by: Noriko Hosoi <nhosoi@redhat.com>
@nhosoi
Copy link
Author

nhosoi commented Jan 11, 2023

Dear woke developers / maintainers,

Our project https://github.com/linux-system-roles/ is hoping to use this feature in the actions. Could you please take a look and share your thoughts? Thank you!

@caitlinelfring
Copy link
Member

Hi there! Apologies for the delay, my notifications for this repo didn't seem to be working. I will take a look and respond in the next few days. I appreciate your patience!

@nhosoi
Copy link
Author

nhosoi commented Jan 11, 2023

Hi there! Apologies for the delay, my notifications for this repo didn't seem to be working. I will take a look and respond in the next few days. I appreciate your patience!

Thanks for your response, @caitlinelfring!

nhosoi added a commit to nhosoi/network that referenced this pull request Jan 15, 2023
Add a check for usage of terms and language that is considered
non-inclusive. We are using the woke tool for this with a wordlist
that can be found at
https://github.com/linux-system-roles/tox-lsr/blob/main/src/tox_lsr/config_files/woke.yml

Note: this commit uses the customized woke placed locally in
    .github/actions/custom-woke-action to support a new option
    --count-only-error-for-failure option.
    The local action custom-woke-action will be replaced with
    the official woke once get-woke/woke#252
    (Add an option "--count-only-error-for-failure") is processed.

Signed-off-by: Noriko Hosoi <nhosoi@redhat.com>
nhosoi added a commit to nhosoi/ansible-pcp that referenced this pull request Jan 16, 2023
Add a check for usage of terms and language that is considered
non-inclusive. We are using the woke tool for this with a wordlist
that can be found at
https://github.com/linux-system-roles/tox-lsr/blob/main/src/tox_lsr/config_files/woke.yml

Note: this commit uses the customized woke placed locally in
    .github/actions/custom-woke-action to support a new option
    --count-only-error-for-failure option.
    The local action custom-woke-action will be replaced with
    the official woke once get-woke/woke#252
    (Add an option "--count-only-error-for-failure") is processed.

Signed-off-by: Noriko Hosoi <nhosoi@redhat.com>
nhosoi added a commit to nhosoi/ansible-pcp that referenced this pull request Jan 16, 2023
Add a check for usage of terms and language that is considered
non-inclusive. We are using the woke tool for this with a wordlist
that can be found at
https://github.com/linux-system-roles/tox-lsr/blob/main/src/tox_lsr/config_files/woke.yml

Note: this commit uses the customized woke placed locally in
    .github/actions/custom-woke-action to support a new option
    --count-only-error-for-failure option.
    The local action custom-woke-action will be replaced with
    the official woke once get-woke/woke#252
    (Add an option "--count-only-error-for-failure") is processed.

Signed-off-by: Noriko Hosoi <nhosoi@redhat.com>
nhosoi added a commit to nhosoi/network that referenced this pull request Jan 16, 2023
Add a check for usage of terms and language that is considered
non-inclusive. We are using the woke tool for this with a wordlist
that can be found at
https://github.com/linux-system-roles/tox-lsr/blob/main/src/tox_lsr/config_files/woke.yml

Note: this commit uses the customized woke placed locally in
    .github/actions/custom-woke-action to support a new option
    --count-only-error-for-failure option.
    The local action custom-woke-action will be replaced with
    the official woke once get-woke/woke#252
    (Add an option "--count-only-error-for-failure") is processed.

Signed-off-by: Noriko Hosoi <nhosoi@redhat.com>
nhosoi added a commit to nhosoi/ssh that referenced this pull request Jan 16, 2023
Add a check for usage of terms and language that is considered
non-inclusive. We are using the woke tool for this with a wordlist
that can be found at
https://github.com/linux-system-roles/tox-lsr/blob/main/src/tox_lsr/config_files/woke.yml

Note: this commit uses the customized woke placed locally in
    .github/actions/custom-woke-action to support a new option
    --count-only-error-for-failure option.
    The local action custom-woke-action will be replaced with
    the official woke once get-woke/woke#252
    (Add an option "--count-only-error-for-failure") is processed.

Signed-off-by: Noriko Hosoi <nhosoi@redhat.com>
nhosoi added a commit to nhosoi/ansible-pcp that referenced this pull request Jan 17, 2023
Add a check for usage of terms and language that is considered
non-inclusive. We are using the woke tool for this with a wordlist
that can be found at
https://github.com/linux-system-roles/tox-lsr/blob/main/src/tox_lsr/config_files/woke.yml

Note: this commit uses the customized woke placed locally in
    .github/actions/custom-woke-action to support a new option
    --count-only-error-for-failure option.
    The local action custom-woke-action will be replaced with
    the official woke once get-woke/woke#252
    (Add an option "--count-only-error-for-failure") is processed.

Signed-off-by: Noriko Hosoi <nhosoi@redhat.com>
nhosoi added a commit to nhosoi/network that referenced this pull request Jan 17, 2023
Add a check for usage of terms and language that is considered
non-inclusive. We are using the woke tool for this with a wordlist
that can be found at
https://github.com/linux-system-roles/tox-lsr/blob/main/src/tox_lsr/config_files/woke.yml

Note: this commit uses the customized woke placed locally in
    .github/actions/custom-woke-action to support a new option
    --count-only-error-for-failure option.
    The local action custom-woke-action will be replaced with
    the official woke once get-woke/woke#252
    (Add an option "--count-only-error-for-failure") is processed.

Signed-off-by: Noriko Hosoi <nhosoi@redhat.com>
richm pushed a commit to linux-system-roles/network that referenced this pull request Jan 19, 2023
Add a check for usage of terms and language that is considered
non-inclusive. We are using the woke tool for this with a wordlist
that can be found at
https://github.com/linux-system-roles/tox-lsr/blob/main/src/tox_lsr/config_files/woke.yml

Note: this commit uses the customized woke placed locally in
    .github/actions/custom-woke-action to support a new option
    --count-only-error-for-failure option.
    The local action custom-woke-action will be replaced with
    the official woke once get-woke/woke#252
    (Add an option "--count-only-error-for-failure") is processed.

Signed-off-by: Noriko Hosoi <nhosoi@redhat.com>
spetrosi pushed a commit to linux-system-roles/mssql that referenced this pull request Jan 25, 2023
* Cleanup non-inclusive words.

- .collection/README.md
- .collection/galaxy.yml
- CHANGELOG.md

* Add check for non-inclusive language

Add a check for usage of terms and language that is considered
non-inclusive. We are using the woke tool for this with a wordlist
that can be found at
https://github.com/linux-system-roles/tox-lsr/blob/main/src/tox_lsr/config_files/woke.yml

Note: this commit uses the customized woke placed locally in
    .github/actions/custom-woke-action to support a new option
    --count-only-error-for-failure option.
    The local action custom-woke-action will be replaced with
    the official woke once get-woke/woke#252
    (Add an option "--count-only-error-for-failure") is processed.

Signed-off-by: Noriko Hosoi <nhosoi@redhat.com>

Signed-off-by: Noriko Hosoi <nhosoi@redhat.com>
@spetrosi
Copy link

spetrosi commented Apr 3, 2023

Hello @caitlinelfring, is there any update on this PR?

2 similar comments
@spetrosi
Copy link

spetrosi commented Jun 8, 2023

Hello @caitlinelfring, is there any update on this PR?

@spetrosi
Copy link

Hello @caitlinelfring, is there any update on this PR?

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.

None yet

3 participants