Skip to content

feat(formatter): Add detekt as Kotlin formatter - #612

Closed
MarcelBochtler wants to merge 1 commit into
anomalyco:devfrom
MarcelBochtler:formatter-detekt
Closed

MarcelBochtler wants to merge 1 commit into
anomalyco:devfrom
MarcelBochtler:formatter-detekt

Conversation

@MarcelBochtler

Copy link
Copy Markdown

detekt 1 can be used as a wrapper for ktlint 2. When using detekt as a formatter, the ktlint CLI is not required and might not be installed. To offer formatting in this case, define detekt --auto-format as formatter for Kotlin source files.

detekt [1] can be used as a wrapper for ktlint [2].
When using detekt as a formatter, the ktlint CLI is not required and
might not be installed. To offer formatting in this case, define
`detekt --auto-format` as formatter for Kotlin source files.

[1]: https://detekt.dev
[2]: https://detekt.dev/docs/rules/formatting
@thdxr

thdxr commented Jul 2, 2025

Copy link
Copy Markdown
Member

are these alternatives to each other? if so i need to rework how this all works

@thdxr thdxr self-assigned this Jul 2, 2025
@MarcelBochtler

MarcelBochtler commented Jul 2, 2025 •

Copy link
Copy Markdown
Author

Yes, with regard to linting, detekt and ktlint are alternatives. There is even a third possibility ktfmt.

teamgroove pushed a commit to teamgroove/opencode that referenced this pull request Aug 3, 2025
Merged from: anomalyco#612
Author: @MarcelBochtler
Auto-merged by opencode-fork integration system
@MarcelBochtler

Copy link
Copy Markdown
Author

No longer required, as custom formatters are now possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants