code-quality-checks
Testing & QualityEnforce code quality with SonarCloud, CheckStyle, SpotBugs, and maintain quality gates
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/Hack23/cia/blob/HEAD/.github/skills/code-quality-checks/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/code-quality-checks, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Code Quality Checks Skill
Purpose
Maintain high code quality through automated static analysis and quality gates.
When to Use
- ✅ Before committing code
- ✅ In CI/CD pipeline
- ✅ During code reviews
- ✅ Regular quality audits
SonarCloud Quality Gates
# sonar-project.properties
sonar.projectKey=Hack23_cia
sonar.organization=hack23
sonar.qualitygate.wait=true
# Quality Gate Thresholds
sonar.coverage.minimum=80
sonar.duplications.maximum=3
sonar.maintainability.rating=A
sonar.reliability.rating=A
sonar.security.rating=A
CheckStyle Configuration
<module name="Checker">
<module name="LineLength">
<property name="max" value="120"/>
</module>
<module name="TreeWalker">
<module name="NeedBraces"/>
<module name="AvoidStarImport"/>
<module name="UnusedImports"/>
</module>
</module>
Maven Quality Plugin
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.10.0.2594</version>
</plugin>
References
- SonarCloud: https://sonarcloud.io/
- CheckStyle: https://checkstyle.org/