Skip to content

Commit 3c02086

Browse files
TODO CI
1 parent a51ea01 commit 3c02086

File tree

1 file changed

+21
-22
lines changed

1 file changed

+21
-22
lines changed

.github/workflows/ci_todos.yml

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
1-
# TODO: Uncomment this
2-
# # This workflow prevents TODOs in code
3-
# name: Check TODOs in code
1+
# This workflow prevents TODOs in code
2+
name: Check TODOs in code
43

5-
# on:
6-
# pull_request:
7-
# push:
8-
# branches:
9-
# - main
4+
on:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
109

11-
# jobs:
12-
# findTodos:
13-
# runs-on: macos-13
14-
# steps:
15-
# - uses: actions/checkout@v3
10+
jobs:
11+
findTodos:
12+
runs-on: macos-13
13+
steps:
14+
- uses: actions/checkout@v3
1615

17-
# - name: Check TODOs in code
18-
# shell: bash
19-
# # TODOs may be committed as long as the same line contains a link to a Github Issue or refers to a CrypTool SIM.
20-
# run: |
21-
# ALL_TODO_COUNT=$( { grep -r "TODO" . --exclude-dir=./releases --exclude-dir=./TestVectors/runtimes --exclude-dir=./submodules --exclude-dir=./.git --exclude=./.github/workflows/ci_todos.yml || true; } | wc -l)
22-
# GOOD_TODO_COUNT=$( { grep -r "TODO.*\(github.com\/.*issues.*\/[1-9][0-9]*\|CrypTool-[1-9][0-9]*\)" . --exclude-dir=./releases --exclude-dir=./submodules --exclude-dir=./.git --exclude-dir=./TestVectors/runtimes --exclude=./.github/workflows/ci_todos.yml || true; } | wc -l)
23-
# if [ "$ALL_TODO_COUNT" != "$GOOD_TODO_COUNT" ]; then
24-
# exit 1;
25-
# fi
16+
- name: Check TODOs in code
17+
shell: bash
18+
# TODOs may be committed as long as the same line contains a link to a Github Issue or refers to a CrypTool SIM.
19+
run: |
20+
ALL_TODO_COUNT=$( { grep -r "TODO" . --exclude-dir=./releases --exclude-dir=./TestVectors/runtimes --exclude-dir=./submodules --exclude-dir=./.git --exclude=./.github/workflows/ci_todos.yml || true; } | wc -l)
21+
GOOD_TODO_COUNT=$( { grep -r "TODO.*\(github.com\/.*issues.*\/[1-9][0-9]*\|CrypTool-[1-9][0-9]*\)" . --exclude-dir=./releases --exclude-dir=./submodules --exclude-dir=./.git --exclude-dir=./TestVectors/runtimes --exclude=./.github/workflows/ci_todos.yml || true; } | wc -l)
22+
if [ "$ALL_TODO_COUNT" != "$GOOD_TODO_COUNT" ]; then
23+
exit 1;
24+
fi

0 commit comments

Comments
 (0)