

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
12345## Context67This instruction file enforces Java code quality standards across all Java modules: Google Java Style Guide formatting, static analysis tooling (SpotBugs, Checkstyle, SonarLint), test coverage mandates (JaCoCo), and security vulnerability scanning (OWASP Dependency-Check). These rules apply to both legacy Spring MVC modules and modern Spring Boot modules. They complement the stack-specific instructions in `spring-boot.instructions.md` and `java-legacy.instructions.md`.89---1011## Google Java Style Guide — Enforced Rules1213All generated Java code must comply with the [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html).1415### Formatting Rules1617| Rule | Value |18|------|-------|19| Indentation | 2 spaces (no tabs) |20| Continuation indent | +4 spaces |21| Column limit | 100 characters |22| Brace style | Egyptian (K&R): opening brace on same line |23| Braces | Always present — even for single-statement blocks |24| Blank lines between members | 1 blank line |25| Blank line after class opening brace | None |26| Wildcard imports | Forbidden |27| Static imports | Grouped first, then all others |28| `var` | Allowed for local variables where the type is clear from the right-hand side |2930### Naming3132| Element | Convention | Example |33|---------|-----------|---------|34| Class | `UpperCamelCase` | `CustomerService` |35| Method | `lowerCamelCase` | `findActiveCustomers` |36| Variable | `lowerCamelCase` | `orderId` |37| Constant | `UPPER_SNAKE_CASE` | `MAX_RETRY_COUNT` |38| Type parameter | Single uppercase or `UpperCamelCase` + `T` | `T`, `CustomerT` |39| Package | All lowercase, dot-separated | `com.example.order` |40| Acronyms | Treated as words | `HttpUrl`, not `HTTPUrl`; `JsonParser`, not `JSONParser` |4142### Javadoc Requirements4344```java45/**46 * Processes a customer payment request and returns the transaction result.47 *48 * <p>If the customer's balance is insufficient, the transaction is declined49 * and a {@link PaymentDeclinedException} is thrown.50 *51 * @param customerId the UUID of the customer making the payment52 * @param amount the payment amount; must be positive53 * @return the completed transaction result54 * @throws PaymentDeclinedException if the payment cannot be processed55 * @throws IllegalArgumentException if {@code amount} is null or non-positive56 */57public TransactionResult processPayment(UUID customerId, BigDecimal amount) { ... }58```5960- `@param` for every parameter61- `@return` for every non-void method62- `@throws` for every checked exception and significant runtime exception63- Use `{@code ...}` for inline code references64- Use `{@link ...}` for type references65- Do not write Javadoc that merely restates the method signature6667---6869## Code Quality — Static Analysis Tools7071### Checkstyle (Google Checks)7273Checkstyle is configured with `google_checks.xml` (provided by the `checkstyle` library). Run locally:7475```bash76mvn checkstyle:check77```7879Common violations to eliminate before committing:80- Line length > 100 characters81- Missing Javadoc on public methods82- Wildcard imports83- Tabs instead of spaces84- Magic numbers (use named constants)85- Missing `@Override` annotation8687### SpotBugs8889SpotBugs performs bytecode-level static analysis. Run locally:9091```bash92mvn spotbugs:check93```9495SpotBugs bug categories to treat as build failures:9697| Category | Examples |98|----------|---------|99| `CORRECTNESS` | Null dereference, infinite loop, integer overflow |100| `SECURITY` | SQL injection, path traversal, hardcoded password |101| `BAD_PRACTICE` | Unclosed streams, ignored return values |102| `PERFORMANCE` | Unnecessary object creation in loops |103104SpotBugs suppression — only with justification:105106```java107@SuppressFBWarnings(108 value = "NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE",109 justification = "findById is called after an existence check; null is impossible here"110)111```112113### PMD (Optional)114115If PMD is configured, enforce:116- `UnusedImports`, `UnusedLocalVariable`117- `EmptyCatchBlock` — must always have a logged message or re-throw118- `SystemPrintln` — use SLF4J119- `AvoidDeeplyNestedIfStmts` — extract methods instead120121---122123## JaCoCo — Test Coverage124125Minimum thresholds enforced at build time:126127| Metric | Threshold |128|--------|----------|129| Line coverage (business logic) | 80% |130| Branch coverage (business logic) | 70% |131| Line coverage (overall) | 70% |132133Exclude from coverage measurement:134- `**/*MapperImpl.java` (MapStruct generated)135- `**/generated/**`136- `**/*Application.java`137- `**/*Config.java` (pure Spring config classes)138- `**/dto/**`, `**/model/**` (pure data holders with no logic)139140```xml141<!-- In jacoco-maven-plugin configuration -->142<excludes>143 <exclude>**/*MapperImpl.class</exclude>144 <exclude>**/generated/**</exclude>145 <exclude>**/*Application.class</exclude>146</excludes>147```148149---150151## OWASP Dependency-Check152153Scans all declared dependencies for known CVEs. Integrated as a Maven plugin; run locally:154155```bash156mvn dependency-check:check157```158159- **CVSS score ≥ 7.0** (High/Critical) → build fails160- **CVSS score 4.0–6.9** (Medium) → generate report; review before merge161- Suppressions require a `suppression.xml` entry with `<notes>` explaining the justification and a review date162163---164165## SonarLint Local Workflow1661671. Install `sonarsource.sonarlint-vscode` extension (in `.vscode/extensions.json`)1682. On file save, SonarLint highlights issues inline in the editor1693. Connect to SonarQube/SonarCloud for team-wide rule synchronization:170 - `Ctrl+Shift+P` → `SonarLint: Connect to SonarQube`171 - Provide server URL and token1724. Run a full file analysis: right-click → `SonarLint: Analyze All Open Files`173174### Rules to Never Suppress175176| Rule Key | Description |177|----------|-------------|178| `java:S2068` | Hardcoded credentials |179| `java:S106` | `System.out.println` usage |180| `java:S1481` | Unused local variable |181| `java:S2095` | Resources must be closed |182| `java:S3457` | Format string not properly formatted |183| `java:S2259` | Null dereference |184| `java:S1874` | Deprecated API usage |185186---187188## Pre-Commit Quality Checklist189190Before every commit, verify:191192- [ ] `mvn checkstyle:check` passes (zero violations)193- [ ] `mvn spotbugs:check` passes (zero high/critical bugs)194- [ ] `mvn test` passes (all unit tests green)195- [ ] SonarLint shows no Blocker or Critical issues in changed files196- [ ] No `System.out.println` in changed files197- [ ] All public methods have Javadoc198- [ ] No hardcoded secrets or connection strings199200---201202## CI Quality Gates203204In CI/CD pipelines, run in this order:205206```bash207mvn verify # compile + unit tests + checkstyle + spotbugs + jacoco208mvn sonar:sonar # SonarQube analysis209mvn dependency-check:check # OWASP CVE scan (may be separate pipeline step)210mvn failsafe:integration-test # integration tests (separate profile)211```212213The pipeline must not pass unless all quality gates are green.214
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| doubts-suplab/eeik-bootstrap.clinerules/golden-rules.md · 1 | Cline rules | gitsecuritydo-not | 61/100 | today | |
| doubts-suplab/eeik-bootstrap.clinerules/project.md · 1 | Cline rules | teststylegit | 63/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/architecture.mdc · 1 | Cursor rules | do-not | 52/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/capabilities.mdc · 1 | Cursor rules | teststylegit | 58/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/golden-rules.mdc · 1 | Cursor rules | gitsecuritydo-not | 61/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/python.mdc · 1 | Cursor rules | lint-formatstyletypesapi+1 | 77/100 | today | |
| doubts-suplab/eeik-bootstrap.cursor/rules/security.mdc · 1 | Cursor rules | security | 39/100 | today | |
| doubts-suplab/eeik-bootstrap.github/copilot-instructions.md · 1 | Copilot instructions | lint-formatstyletesting-strategygit+2 | 54/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/a2a-protocol.instructions.md · 1 | Copilot instructions | styleagent-behaviour | 48/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/ai-governance.instructions.md · 1 | Copilot instructions | stylearchdo-notagent-behaviour | 61/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/angular.instructions.md · 1 | Copilot instructions | teststyletypestesting-strategy+4 | 69/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/architecture-governance.instructions.md · 1 | Copilot instructions | testlint-formatstylegit+4 | 65/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/autogen.instructions.md · 1 | Copilot instructions | typessecurityagent-behaviour | 50/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/aws-architecture.instructions.md · 1 | Copilot instructions | styletypessecurityperformance | 58/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/aws-data-ml-ai.instructions.md · 1 | Copilot instructions | deployment | 54/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/cdk-terraform.instructions.md · 1 | Copilot instructions | teststylearchtypes+2 | 96/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/cicd.instructions.md · 1 | Copilot instructions | stylesecuritydeploymentdo-not+1 | 65/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/containerisation.instructions.md · 1 | Copilot instructions | buildstylesecuritydo-not | 77/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/crewai.instructions.md · 1 | Copilot instructions | styleagent-behaviour | 48/100 | today | |
| doubts-suplab/eeik-bootstrap.github/instructions/data-engineering.instructions.md · 1 | Copilot instructions | teststyletypesgit+5 | 69/100 | today |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| chihebnabil/lovable-boilerplate.github/instructions/global.instructions.md · 65 | Copilot instructions | buildlint-formatstylearch+4 | 100/100 | 14 days ago | |
| HerringtonDarkholme/megarepo.github/copilot-instructions.md · 17 | Copilot instructions | setupbuildtestlint-format+7 | 100/100 | 14 days ago | |
| louislam/uptime-kuma.github/copilot-instructions.md · 90k | Copilot instructions | setupbuildtestlint-format+9 | 100/100 | 14 days ago | |
| pytorch/pytorch.github/copilot-instructions.md · 102k | Copilot instructions | setupbuildteststyle+5 | 100/100 | 14 days ago | |
| bagisto/bagisto.github/copilot-instructions.md · 28k | Copilot instructions | setupbuildteststyle+5 | 97/100 | 14 days ago | |
| JCodesMore/ai-website-cloner-template.github/copilot-instructions.md · 32k | Copilot instructions | buildlint-formatstylearch+3 | 97/100 | 7 days ago | |
| hiyouga/LlamaFactory.github/copilot-instructions.md · 74k | Copilot instructions | setupbuildtestlint-format+5 | 97/100 | 13 days ago | |
| darkmatter/nixmac.github/copilot-instructions.md · 25 | Copilot instructions | setupbuildtestlint-format+8 | 96/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/doubts-suplab-eeik-bootstrap-github-instructions-java-quality-instructions)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.