Skip to content

Commit 7c6b267

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 7c6b267

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
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

+10-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,16 @@ jobs:
4848
bundle config --without benchmark
4949
bundle install
5050
51-
- run: rake compile
51+
- run: rake ragel compile
52+
53+
- run: |
54+
if ! git diff-index --quiet HEAD; then
55+
printf 'These files changed when running Ragel:\n\n'
56+
git diff-index HEAD
57+
echo ---------
58+
git diff
59+
exit 1
60+
fi
5261
5362
- run: rake test JSON_COMPACT=1
5463

0 commit comments

Comments
 (0)