Repository navigation
ci: establish GitHub Actions CI workflow and fix code quality issues - #12
Merged
Merged
Conversation
Add comprehensive CI pipeline with code quality checks: - Add .github/workflows/ci.yml workflow * Triggers on push to main and pull requests * Ignores changes in docs/ folder * Uses commit hashes for action pinning (security best practice) * Runs Maven verify with ci profile * Uploads test results and reports as artifacts - Add ci profile to pom.xml with quality gates: * SpotBugs analysis (Max effort, Medium threshold) * PMD code analysis with failing error reporting * CPD (copy-paste detection) with 150 token minimum * All checks fail build on violations - Configure Spotless formatting enforcement in verify phase This establishes automated code quality checks on every push and PR, ensuring consistent code standards and catching issues early.
Fix code quality issues identified by static analysis tools and apply consistent formatting across the codebase. **Code Quality Fixes:** - Fix CT_CONSTRUCTOR_THROW in Ini, Options, Reg classes * Make classes final to prevent finalizer attacks * Secure constructors that throw exceptions during initialization - Modernize JUnit test assertions * Replace try-catch-fail patterns with assertThrows * Update BeanToolTest, BasicOptionMapTest to modern JUnit 4 style * Remove @SuppressWarnings("empty-statement") annotations - Fix PMD violations * Remove unused imports and variables * Improve exception handling patterns * Clean up code structure **Formatting Changes:** - Reformat all XML files with Spotless eclipseWtp formatter * Consistent indentation (4 spaces) * Trim trailing whitespace * End files with newline - Java files remain Google Java Style compliant (no changes needed) All changes are non-functional - tests remain passing (206/206). Prepares codebase for automated CI quality gates.
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR establishes a comprehensive CI pipeline with automated code quality checks and fixes existing violations identified by static analysis tools.
Changes
CI/CD Infrastructure
.github/workflows/ci.yml)Build Configuration
ciprofile to pom.xml with quality gates:Code Quality Fixes
Formatting
Testing
Related Issues
Closes #11
Breaking Changes
None - all changes are non-functional improvements to code quality and CI infrastructure.
Relates to Phase 2 of the v0.6.0 roadmap.