Skip to content

Commit

Permalink
Mark parser.c and Parser.java as generated files
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
byroot committed Nov 7, 2024
1 parent 4c2433d commit d6832b3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ext/json/ext/parser/parser.c linguist-generated=true
java/src/json/ext/Parser.java linguist-generated=true
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ jobs:
- run: rake compile

- run: |
if ! git diff-index --quiet HEAD; then
printf 'These files changed when running the command:\n\n'
git diff --name-only | while read -r n ; do
echo "* $n"
done
exit 1
fi
- run: rake test JSON_COMPACT=1

- run: rake build
Expand Down
2 changes: 1 addition & 1 deletion ext/json/ext/parser/parser.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d6832b3

Please sign in to comment.