Skip to content

Commit d6832b3

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 d6832b3

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-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

+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 the command:\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

ext/json/ext/parser/parser.c

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)