Commit Graph
3 Commits
Author SHA1 Message Date
TATSUNO “Taz” Yasuhiro e4278a800c chore(style): Enforce no-FQCN rule on new files, existing bad files later (#5094)
* chore: flag unnecessary fully qualified type names with Checkstyle

Use the built-in UnnecessaryFullyQualifiedType check. It allows a
qualified name when another type with the same simple name is used in
the same file.

The 379 files that have such names today are listed in
suppressions.xml, so only new files are checked for now. Remove an
entry once its file is clean.

* docs: drop the written no-FQCN rule now that Checkstyle checks it

* docs: keep the written no-FQCN rule for files Checkstyle still skips

The baselined files are not checked, and the comment that names a clash
is not something the check can enforce.
2026-10-10 09:22:14 -05:00
David Phillips da6a7dd085 build: enforce Java import order with Checkstyle (#5326)
* style: align Java imports with project guidelines

* build: enforce consistent Java import order

* style: follow IntelliJ import order
2026-10-08 20:50:53 -04:00
TATSUNO “Taz” Yasuhiro 76adb9a97e chore(style): Enforce NoVar rule on new files, existing bad files later (#4362)
* chore: ban var with Checkstyle in CI

Checkstyle runs tools/checkstyle/checkstyle.xml over src and compatibility-tests/sdk-test-java in its own workflow. It stays out of the Maven lifecycle because a full run takes about 30 seconds.

Code that already uses var is listed in tools/checkstyle/suppressions.xml, one entry per service and one per compatibility-tests file, so each can be cleaned and removed in its own PR.

* docs: point AGENTS.md and CONTRIBUTING.md at Checkstyle

* chore: load Checkstyle suppressions from checkstyle.xml

IDE plugins such as CheckStyle-IDEA set config_loc to the config directory and now apply the same suppressions as CI. Maven sets config_loc through propertyExpansion.

* chore: exclude files, not directories, from the var check

New files in services that still use var are now checked too.

* chore: exclude the renamed NativeDynamoDbJsonHandler files from the var check
2026-09-30 21:53:14 -05:00