Skip to content

Commit a02b6a6

Browse files
authored
Make Forbid TODOs check into its own CI step (#2311)
- Fixes #2180 ## Checklist - [-] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [-] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [-] I have not broken the cheatsheet
1 parent 4fa46de commit a02b6a6

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

.github/workflows/forbid-todo.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Forbid TODO
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
merge_group:
7+
branches: [main]
8+
9+
jobs:
10+
forbid-todo:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Forbid TODO
15+
run: ./scripts/forbid-todo.sh

.github/workflows/test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,3 @@ jobs:
7272
name: dumps
7373
path: ${{ env.VSCODE_CRASH_DIR }}
7474
if: failure()
75-
- name: Forbid TODOs
76-
run: ./scripts/forbid-todo.sh

scripts/forbid-todo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -euo pipefail
44

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

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

0 commit comments

Comments
 (0)