Archived
- docs/coding-standards.md: Comprehensive Java coding standards - CLAUDE.md: AI assistant instructions for the project - .editorconfig: Editor configuration for consistent formatting - pom.xml: Updated with quality plugins (Checkstyle, SpotBugs, PMD, JaCoCo) - config/checkstyle/: Checkstyle configuration (Google Java Style based) - config/spotbugs/: SpotBugs exclusions - config/pmd/: PMD ruleset - .githooks/pre-commit: Pre-commit hook for local quality checks - .github/workflows/lint.yml: CI workflow for automated quality checks - docs/development.md: Updated for Java/Maven toolchain Quality enforcement: - Checkstyle runs on validate phase - SpotBugs and PMD run on verify phase - JaCoCo enforces 80% line coverage, 70% branch coverage - Pre-commit hook runs all checks before allowing commits - CI runs all checks on push and PR Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
119 lines
2.5 KiB
YAML
119 lines
2.5 KiB
YAML
name: Lint
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
checkstyle:
|
|
name: Checkstyle
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'temurin'
|
|
cache: maven
|
|
|
|
- name: Run Checkstyle
|
|
run: mvn checkstyle:check
|
|
|
|
spotbugs:
|
|
name: SpotBugs
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'temurin'
|
|
cache: maven
|
|
|
|
- name: Run SpotBugs
|
|
run: mvn compile spotbugs:check
|
|
|
|
- name: Upload SpotBugs Report
|
|
uses: actions/upload-artifact@v4
|
|
if: failure()
|
|
with:
|
|
name: spotbugs-report
|
|
path: target/spotbugsXml.xml
|
|
|
|
pmd:
|
|
name: PMD
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'temurin'
|
|
cache: maven
|
|
|
|
- name: Run PMD
|
|
run: mvn compile pmd:check
|
|
|
|
- name: Upload PMD Report
|
|
uses: actions/upload-artifact@v4
|
|
if: failure()
|
|
with:
|
|
name: pmd-report
|
|
path: target/pmd.xml
|
|
|
|
test:
|
|
name: Tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'temurin'
|
|
cache: maven
|
|
|
|
- name: Run Tests with Coverage
|
|
run: mvn test jacoco:report
|
|
|
|
- name: Upload Coverage Report
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: coverage-report
|
|
path: target/site/jacoco/
|
|
|
|
- name: Check Coverage Thresholds
|
|
run: mvn jacoco:check
|
|
|
|
verify:
|
|
name: Full Verification
|
|
needs: [checkstyle, spotbugs, pmd, test]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'temurin'
|
|
cache: maven
|
|
|
|
- name: Run Full Verify
|
|
run: mvn verify
|
|
|
|
- name: Upload Build Artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: build-artifacts
|
|
path: target/*.jar
|