Skip to content

Commit

Permalink
Adds a linter for inclusive language suggestions (#156)
Browse files Browse the repository at this point in the history
* configure alex, which searches for instances of uninclusive language

* create workflow to scan for non-inclusive language

* do not fail until we've resolved existing warnings

* add comment about scala steward exclusion

* rename workflow

* use npx

Co-authored-by: Akash Askoolum <[email protected]>

* exclude "special"

---------

Co-authored-by: Akash Askoolum <[email protected]>
  • Loading branch information
NovemberTang and akash1810 authored Jan 25, 2024
1 parent 5dff12d commit c412682
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .alexrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
exports.profanitySureness = 1;
exports.allow = [
"steward-stewardess", //Exclude this rule as we get false positives from references to Scala Steward
"special"
];
29 changes: 29 additions & 0 deletions .github/workflows/inclusion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Find full documentation here https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
name: Inclusive Language

on:
pull_request:

# Manual invocation.
workflow_dispatch:

push:
branches:
- main

jobs:
inclusion-lint:
timeout-minutes: 15
runs-on: ubuntu-latest

# See https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
permissions:
contents: read
steps:
- uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4

- name: Run inclusion
run: npx alex -q *.md || echo "Catch warnings and exit 0" # Once all warnings have been resolved, remove the second statement

0 comments on commit c412682

Please sign in to comment.