원클릭으로
coding-standards
jhelm project coding standards and conventions for Java 21 with Lombok and Maven
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
jhelm project coding standards and conventions for Java 21 with Lombok and Maven
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Check and fix Checkstyle violations in jhelm modules
Implement a GitHub issue with branch and pull request workflow
Auto-format, fix violations, and run Maven validate (PMD + Checkstyle) in one step
jhelm project architecture and module structure for a Java Helm implementation
Code review automation for Java, TypeScript, JavaScript, Python, Go. Analyzes PRs for complexity and risk, checks code quality for SOLID violations and code smells, generates review reports. Use when reviewing pull requests, analyzing code quality, identifying issues, generating review checklists.
Check JaCoCo code coverage for jhelm modules
| name | coding-standards |
| description | jhelm project coding standards and conventions for Java 21 with Lombok and Maven |
| user-invocable | false |
spring-javaformat-maven-plugin)PascalCase, methods/variables camelCase, constants UPPER_SNAKE_CASE{@code true}/{@code false} for booleans, accurate @param/@return tags@Getter/@Setter for simple fields, @Data for POJOs/DTOs@Builder, @NoArgsConstructor, @AllArgsConstructor for complex objects@Slf4j for logging@Accessors(fluent = true) for internal DSL-like classes"""...""") for multi-line stringsFiles.walk())@Slf4j — no System.out.println in production code (CLI output in jhelm-cli is the exception)must* function variants when strict validation is requiredpom.xml <dependencyManagement>pom.xml <properties> (unless managed by Spring Boot parent)jhelm-gotemplate free of Spring dependenciesTwo thresholds apply — consider and enforce:
| Scope | Consider refactoring | Checkstyle enforces (build fails) |
|---|---|---|
| File | > 500 lines | > 800 lines |
| Method | > 50 lines | > 80 lines |
Consider (500 lines / 50 lines): A warning signal. Before adding more code to a large file or method, ask whether it should be split. Extract helpers, separate concerns, or move related methods to a dedicated class.
Enforce (1000 lines / 80 lines): Hard limit. The build fails at validate phase. Refactoring is required — no exceptions except the suppressions below.
Current suppressions (checkstyle-suppressions.xml):
Lexer.java, Parser.java — state machines; long methods are inherent to the patternHelmChartTemplates.java — methods return static YAML text blocks, not logic*Test.java — test files are exempt from both size limitsex, not e (SpringCatch)if/else/for/while always need {} (NeedBraces)(r) -> ... not r -> ... (SpringLambda)-> { return x; } → -> x when body is single expression (SpringLambda)(a != null) ? x : y (SpringTernary).* to explicit class imports (AvoidStarImport)private Constructor() {} AND be final (SpringHideUtilityClassConstructor + FinalClass)}) in @CsvSource, etc. (AnnotationUseStyle)Auto-fix: ./mvnw spring-javaformat:apply then use the /checkstyle skill for remaining violations.
org.junit.jupiter.api) with Assertions@TempDir for temporary filesPrefer real test data over mocks. Mocks are slow to maintain, hide intent, and test the wrong thing when the real thing is easy to use.
| Scenario | Preferred approach |
|---|---|
| Template rendering | Inline Go template strings or files in src/test/resources/test-charts/ |
| YAML parsing | Inline YAML text blocks or files in test resources |
| Chart loading/untarring | Minimal chart dir in src/test/resources/test-charts/, or small programmatic .tgz |
| File system operations | @TempDir with real files |
| HTTP calls (updateRepo, pullFromUrl, OCI) | Mockito mock on CloseableHttpClient — acceptable, network is unavoidable |
| Kubernetes API calls | Mockito mock on KubeService — acceptable |
When Mockito IS appropriate:
CloseableHttpClient) — network I/O has no real alternativeKubeService) — requires a live clusterCreating minimal test charts — place in src/test/resources/test-charts/<name>/:
Chart.yaml (name, version, apiVersion)
values.yaml (minimal defaults)
templates/ (one simple template)
Use new TarArchiveOutputStream(new GzipCompressorOutputStream(...)) in a helper method when a .tgz is needed in-memory.
Use @ParameterizedTest to avoid code duplication and loops in tests. Prefer parameterized tests over:
@Test methods that differ only in input/expected valuesfor loops inside test methods that iterate over test casesCommon sources:
@CsvSource — inline comma-separated values for simple types@ValueSource — single-argument tests with strings, ints, etc.@MethodSource — complex objects or multi-arg via static factory method returning Stream<Arguments>@EnumSource — iterate over enum valuesExample — prefer this:
@ParameterizedTest
@CsvSource({
"hello, HELLO",
"world, WORLD",
"'', ''"
})
void testUpperCase(String input, String expected) {
assertEquals(expected, input.toUpperCase());
}
Over this:
@Test
void testUpperCase() {
assertEquals("HELLO", "hello".toUpperCase());
assertEquals("WORLD", "world".toUpperCase());
assertEquals("", "".toUpperCase());
}
Use @MethodSource for complex data:
@ParameterizedTest
@MethodSource("templateTestCases")
void testTemplateRendering(String template, Map<String, Object> data, String expected) {
// ...
}
static Stream<Arguments> templateTestCases() {
return Stream.of(
Arguments.of("{{ .name }}", Map.of("name", "Alice"), "Alice"),
Arguments.of("{{ .count }}", Map.of("count", 42), "42")
);
}