Skip to content

Commit

Permalink
Make Forbid TODOs check into its own CI step
Browse files Browse the repository at this point in the history
- Fixes #2180
  • Loading branch information
pokey committed Apr 26, 2024
1 parent a1bb6e4 commit 82552f2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/forbid-todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Forbid TODO

on:
pull_request:
types: [opened, synchronize, reopened]
merge_group:
branches: [main]

jobs:
forbid-todo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Forbid TODO
run: ./scripts/forbid-todo.sh
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,3 @@ jobs:
name: dumps
path: ${{ env.VSCODE_CRASH_DIR }}
if: failure()
- name: Forbid TODOs
run: ./scripts/forbid-todo.sh
2 changes: 1 addition & 1 deletion scripts/forbid-todo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euo pipefail

# Find the string 'TODO' in all files tracked by git, excluding
# this file
TODOS_FOUND=$(git grep --color=always -nw TODO -- ':!scripts/forbid-todo.sh' || true)
TODOS_FOUND=$(git grep --color=always -nw TODO -- ':!scripts/forbid-todo.sh' ':!.github/workflows/forbid-todo.yml' || true)

if [ -n "$TODOS_FOUND" ]; then
printf "\e[1;31mERROR: \e[0mTODOs found in codebase:\n"
Expand Down

0 comments on commit 82552f2

Please sign in to comment.