Repository navigation
chore: keep the trailing-whitespace hook off the generated GraphQL parser - #11542
Conversation
|
This pull request is merged. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Reviewed: a small, well-scoped config change. The exclude regex is limited to the generated |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Coverage variation | ✅ -4.40% coverage variation |
| Diff coverage | ✅ ∅ diff coverage |
Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (147630b) 282225 248488 88.05% Head commit (2cb5b89) 315824 (+33599) 264187 (+15699) 83.65% (-4.40%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>
Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#11542) 0 0 ∅ (not applicable) Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #11542 +/- ##
==========================================
- Coverage 79.99% 79.98% -0.01%
==========================================
Files 2457 2457
Lines 282225 282225
Branches 62038 62038
==========================================
- Hits 225758 225741 -17
- Misses 33779 33791 +12
- Partials 22688 22693 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What
Excludes the JavaCC-generated
GraphQLParser*.javafiles from thetrailing-whitespacepre-commit hook.Why
JavaCC writes its token tables as
0x0L,(with a space after each comma). The graphql build regenerates the parser whenevergraphql.jjtis newer than the generated sources, so every grammar change puts the whitespace back and thelintjob goes red. This has happened twice: #9224 stripped it by hand, then #11525 (for #11447/#11451/#11452) merged it back and main's lint was red at 880f335 until #11540 stripped it again.The exclude is limited to the generated
GraphQLParser*files. Hand-written parser node classes andgraphql.jjtstay covered, and so do all the other hooks (end-of-file, mixed line endings).Verification
pre-commit run --files .pre-commit-config.yaml: all hooks pass, check-yaml included.GraphQLParserTokenManager.java(20 lines with trailing whitespace) and ranpre-commit run trailing-whitespaceon it. The hook reports "no files to check" and leaves the file untouched.GraphQLParser.java,GraphQLParserTokenManager.javaandGraphQLParserConstants.java, and does not matchIntValue.javaorgraphql.jjt.Summary by CodeRabbit