Skip to content

Commit 7496b5a

Browse files
committed
Mark parser.c and Parser.java as generated files
This way they're hidden in diffs. However so ensure no code is slipped into it, we ensure on CI that what was committed is really the Ragel output.
1 parent 4c2433d commit 7496b5a

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ext/json/ext/parser/parser.c linguist-generated=true
2+
java/src/json/ext/Parser.java linguist-generated=true

.github/workflows/ci.yml

+11
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,17 @@ jobs:
5050
5151
- run: rake compile
5252

53+
- run: |
54+
if ! git diff-index --quiet HEAD; then
55+
printf 'These files changed when running Ragel:\n\n'
56+
57+
git diff --name-only | while read -r n ; do
58+
echo "* $n"
59+
done
60+
61+
exit 1
62+
fi
63+
5364
- run: rake test JSON_COMPACT=1
5465

5566
- run: rake build

0 commit comments

Comments
 (0)