feat(check): java public-class ⇄ file-name mismatch — layout finding with a ready jmove mv repair
- parser::java::class_name: exactly-one-public-top-level-type rule
(package-info/module-info and 0-or-2-public files skipped)
- check gains name_mismatches[] (JSON, omitted when clean) + human lines;
exit 2 covers both kinds; fix engine untouched by design — a file rename
is not a byte edit, and mv keeps the FQN so no imports change
- output split into output/{mod,check} to stay under the 250-line rule
- e2e: reports Bad.java, stays quiet on Good.java, suggested rename makes
check pass and preserves the file bytes
This commit is contained in:
parent
c0b06efe57
commit
f8004e669b
12 changed files with 334 additions and 80 deletions
3
tests/java/mismatch/src/main/java/com/example/Bad.java
Normal file
3
tests/java/mismatch/src/main/java/com/example/Bad.java
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
package com.example;
|
||||
|
||||
public class Wrong {}
|
||||
3
tests/java/mismatch/src/main/java/com/example/Good.java
Normal file
3
tests/java/mismatch/src/main/java/com/example/Good.java
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
package com.example;
|
||||
|
||||
public class Good {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue