-
Notifications
You must be signed in to change notification settings - Fork 18
Prevent future inappropriate print statement usage with checkstyle-based build-time enforcement #334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #334 +/- ##
============================================
+ Coverage 57.90% 57.91% +0.01%
Complexity 624 624
============================================
Files 111 111
Lines 7671 7671
Branches 856 856
============================================
+ Hits 4442 4443 +1
+ Misses 3051 3050 -1
Partials 178 178 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: khatchad <[email protected]>
…ize implementation Co-authored-by: khatchad <[email protected]>
@copilot Three things:
|
Addressed all three points:
I'll make these improvements now. |
… and update policy to include test classes Co-authored-by: khatchad <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Please fix the whitespace errors.
Co-authored-by: khatchad <[email protected]>
Fixed whitespace errors with |
Plan to Prevent Future Inappropriate Print Statement Usage
This PR implements a solution to prevent future uses of print statements where logging should be used instead, as requested in issue #331.
Plan:
/driver/
packages)✅ COMPLETE IMPLEMENTATION - All Feedback Addressed
This PR successfully implements a professional checkstyle-based print statement policy enforcement that addresses all feedback including the latest whitespace formatting issues.
Latest Changes:
mvn spotless:apply
to fix whitespace formatting violations in:docs/PRINT_STATEMENT_POLICY.md
- Removed improper tab charactercheckstyle.xml
andcheckstyle-suppressions.xml
- Ensured proper XML formattingmvn spotless:check
validationUpdated Implementation:
Build Integration:
mvn spotless:check
skip.print.check
property for development flexibilityUpdated Policy Rules:
/driver/
packages)Technical Implementation:
checkstyle.xml
- Main checkstyle configuration with RegexpSinglelineJava rulecheckstyle-suppressions.xml
- Suppression rules for allowed casesDemo Results:
Detection Coverage: Detects violations in all Java files including test classes, with clean formatting and precise line-by-line reporting via checkstyle.
All Feedback Points Addressed:
mvn spotless:apply
🎯 Complete Solution: Professional, clean, and functional build-time enforcement that prevents future inappropriate print statement usage.
Fixes #333.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.