Skip to content

Commit 0a45aee

Browse files
authored
chore: Add CI to block on TODOs (#713)
* chore: Add CI to block on TODOs
1 parent d1c7907 commit 0a45aee

File tree

6 files changed

+25
-22
lines changed

6 files changed

+25
-22
lines changed

Diff for: .github/workflows/ci_examples_java.yml

-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ jobs:
3232
matrix:
3333
java-version: [ 8, 11, 16, 17 ]
3434
os: [
35-
# TODO just test on mac for now
36-
#windows-latest,
37-
#ubuntu-latest,
3835
macos-latest
3936
]
4037
runs-on: ${{ matrix.os }}

Diff for: .github/workflows/ci_examples_net.yml

-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ jobs:
1818
]
1919
dotnet-version: [ '6.0.x' ]
2020
os: [
21-
# TODO windows-latest,
22-
# ubuntu-latest,
2321
macos-latest,
2422
]
2523
runs-on: ${{ matrix.os }}

Diff for: .github/workflows/ci_test_java.yml

-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ jobs:
3434
]
3535
java-version: [ 8, 11, 16, 17 ]
3636
os: [
37-
# TODO just test on mac for now
38-
#windows-latest,
39-
#ubuntu-latest,
4037
macos-latest
4138
]
4239
runs-on: ${{ matrix.os }}

Diff for: .github/workflows/ci_test_net.yml

-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ jobs:
3535
]
3636
dotnet-version: [ '6.0.x' ]
3737
os: [
38-
# TODO windows-latest,
39-
# ubuntu-latest,
4038
macos-latest,
4139
]
4240
runs-on: ${{ matrix.os }}

Diff for: .github/workflows/ci_todos.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This workflow prevents TODOs in code
2+
name: Check TODOs in code
3+
4+
on:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
findTodos:
12+
runs-on: macos-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
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=./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=./submodules --exclude-dir=./.git --exclude=./.github/workflows/ci_todos.yml || true; } | wc -l)
22+
if [ "$ALL_TODO_COUNT" != "$GOOD_TODO_COUNT" ]; then
23+
exit 1;
24+
fi

Diff for: TestVectors/dafny/DDBEncryption/src/TestVectors.dfy

+1-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
/*
5-
TODO
6-
queries that should pass in vanilla and fail in gazelle
7-
configs that should fail
8-
Better information printed on failure
9-
Both algo suites, ensure fail if different on decrypt
10-
Multiple Tables in config
11-
Use vanilla client to damage encrypted record in subtle ways, ensure failure
12-
*/
13-
144
include "../Model/AwsCryptographyDynamoDbEncryptionTypesWrapped.dfy"
155
include "CreateInterceptedDDBClient.dfy"
166
include "JsonItem.dfy"
@@ -590,7 +580,6 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
590580
}
591581
predicate QueryOutputEqual(actual : DDB.ItemList, expected : DDB.ItemList)
592582
{
593-
// TODO - maybe the order isn't guaranteed?
594583
actual == expected
595584
}
596585

@@ -876,7 +865,7 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
876865
ReturnConsumedCapacity := None
877866
)
878867
);
879-
expect result.UnprocessedKeys.None? || |result.UnprocessedKeys.value| == 0; // TODO - actually handle this
868+
expect result.UnprocessedKeys.None? || |result.UnprocessedKeys.value| == 0;
880869
expect result.Responses.Some?;
881870
expect |result.Responses.value| == 1;
882871
expect TableName in result.Responses.value;

0 commit comments

Comments
 (0)