Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/woke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# yamllint disable rule:line-length
name: Check for non-inclusive language
on: # yamllint disable-line rule:truthy
- pull_request
jobs:
woke:
name: woke
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: woke
uses: get-woke/woke-action@v0
with:
woke-args: "-c https://raw.githubusercontent.com/linux-system-roles/tox-lsr/main/src/tox_lsr/config_files/woke.yml"
# Cause the check to fail on any broke rules
fail-on-error: true
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ clean postfix installation.

**WARNING**: If you specify `previous: replaced`, the role reinstalls the postfix
package and replaces the existing `/etc/postfix/main.cf` and
`/etc/postix/master.cf` files. Ensure to back up those files to preserve your
settings.
`/etc/postfix/master.cf` files. <!--- wokeignore:rule=master -->
Copy link
Contributor

@richm richm Dec 21, 2022

Choose a reason for hiding this comment

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

@nhosoi do you know if there is a way to have an "allow" rule in woke.yml? For example, it would be good to be able to specify something like

- term: /etc/postfix/master.cf
  severity: allow
- term: master
  severity: error

that is, if woke found the string /etc/postfix/master.cf in any file, it would be allowed, no warnings. But other instances of the string master would be flagged.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

severity takes the value info, as well. But it's also "counted" and reported as a failure in the woke.yml action unless we apply this patch get-woke/woke#252... (;_;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Plus, if both master and /etc/postfix/master.cf is defined in the rule, it seems both matches.

Rule example:

rules:
  - name: master.cf
    terms:
      - master.cf
    alternatives:
      - master.cf
    severity: info

  - name: master
    terms:
      - master
    alternatives:
      - primary
      - source
      - initiator,requester
      - controller,host
      - director
    severity: warning

Woke result.

README.md:42:13-22: `master.cf` may be insensitive, use `master.cf` instead (info)
`/etc/postix/master.cf` files. Ensure to back up those files to preserve your
             ^
README.md:42:13-19: `master` may be insensitive, use `primary`, `source`, `initiator,requester`, `controller,host`, `director` instead (warning)
`/etc/postix/master.cf` files. Ensure to back up those files to preserve your
             ^

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we want to add another value allow to severity which completely skips the check???

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to add another value allow to severity which completely skips the check???

Something to consider for a future version of woke, but for now, this is ok.

Ensure to back up those files to preserve your settings.

If you specify only `previous: replaced` under the `postfix_conf` dictionary,
the role re-installs the `postfix` package and enables the `postfix` service
Expand Down