-
Notifications
You must be signed in to change notification settings - Fork 193
Add lint skill and wire it into the agent skill workflow #2985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,53 @@ | ||||||
| --- | ||||||
| name: lint | ||||||
| description: Fix code style issues and ensure linting passes. Use when asked to fix lint errors, formatting issues, or when ktlint or Checkstyle violations are reported. | ||||||
| --- | ||||||
|
|
||||||
| # Lint Skill — S3Mock | ||||||
|
|
||||||
| Read `AGENTS.md` (root + relevant module) before making changes. | ||||||
|
|
||||||
| ## Linters | ||||||
|
|
||||||
| S3Mock uses two linting tools that run as required CI gates: | ||||||
|
|
||||||
| | Tool | Target | Config | Auto-fix? | | ||||||
| |------|--------|--------|-----------| | ||||||
| | **ktlint** | Kotlin source files | `.editorconfig` | Yes — `make format` | | ||||||
| | **Checkstyle** | Java source + XML files | `etc/checkstyle.xml` | No — fix manually | | ||||||
|
|
||||||
| Both run automatically as part of the full build (`make install`). | ||||||
|
|
||||||
| ## Workflow | ||||||
|
|
||||||
| 1. **Run `make format`** — auto-formats all Kotlin files with ktlint. Fixes the vast majority of Kotlin style issues. | ||||||
| 2. **Run `./mvnw checkstyle:check`** — reports Checkstyle violations for Java and XML files. Fix violations manually. | ||||||
| 3. **Re-run `make install`** — confirm all linting gates pass before submitting. | ||||||
|
|
||||||
| ## ktlint (Kotlin) | ||||||
|
|
||||||
| `make format` auto-fixes most issues. Common violations: | ||||||
| - Wrong indentation (4 spaces for Kotlin) | ||||||
| - Unused or wildcard imports | ||||||
| - Missing trailing newline | ||||||
| - Line length (max 120 characters — see `.editorconfig`) | ||||||
|
||||||
| - Line length (max 120 characters — see `.editorconfig`) | |
| - Line length (ktlint default: max 120 characters) |
Copilot
AI
Feb 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indentation specification is incorrect. According to the .editorconfig file (line 8), the default indent_size is 2 spaces for all files including Java. There's no Java-specific override that changes this to 2 spaces - it's already 2 spaces by default. The statement about "2 spaces for Java" is technically correct but misleading since it's the same as the default for all files in the project.
| - Wrong indentation (2 spaces for Java) | |
| - Wrong indentation (2 spaces, per `.editorconfig`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indentation specification is incorrect. According to the .editorconfig file (line 8), the default indent_size is 2 spaces, and there's no Kotlin-specific override. Kotlin files in this project use 2 spaces for indentation, not 4. This can be verified by examining any Kotlin file in the server/src directory.