Skip to content

Don't enable rules by default that are only enabled when using ktlint_official code style#8845

Merged
3flex merged 5 commits into
detekt:mainfrom
3flex:align-ktlint-enabled
Nov 15, 2025
Merged

Don't enable rules by default that are only enabled when using ktlint_official code style#8845
3flex merged 5 commits into
detekt:mainfrom
3flex:align-ktlint-enabled

Conversation

@3flex
Copy link
Copy Markdown
Member

@3flex 3flex commented Nov 15, 2025

I don't consider this a notable change since these rules were only enabled by default from 2.0.0 anyway - reversing that will have no impact on anyone upgrading from 1.x.

…ode style

detekt uses intellij_idea code style by default. These ktlint rules are not
enabled by default unless ktlint_official code style is used so they should
not be enabled by default in detekt.
@3flex 3flex added this to the 2.0.0 milestone Nov 15, 2025
@3flex 3flex changed the title Don't enable rules that are only enabled when using ktlint_official code style Don't enable rules by default that are only enabled when using ktlint_official code style Nov 15, 2025
@detekt-ci
Copy link
Copy Markdown
Collaborator

detekt-ci commented Nov 15, 2025

Warnings
⚠️ It looks like this PR contains functional changes without a corresponding test.

Generated by 🚫 dangerJS against ed89860

@3flex 3flex force-pushed the align-ktlint-enabled branch from 18c3474 to 3ad618a Compare November 15, 2025 01:48
@detekt-ci detekt-ci added the cli label Nov 15, 2025
@3flex 3flex force-pushed the align-ktlint-enabled branch from 3ff30f4 to 975877c Compare November 15, 2025 02:02
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.40%. Comparing base (49148cb) to head (ed89860).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8845      +/-   ##
============================================
- Coverage     85.40%   85.40%   -0.01%     
  Complexity     4374     4374              
============================================
  Files           570      570              
  Lines         12523    12522       -1     
  Branches       2603     2603              
============================================
- Hits          10695    10694       -1     
  Misses          693      693              
  Partials       1135     1135              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

val name: String = "Poko"
fun hello() = "Hello, $name"


Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change intentional?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Due to changes in the default config this stopped failing (since tests that use this resource are testing using the default detekt config). I added the duplicate lines to create a new failure triggered by NoConsecutiveBlankLines.

@3flex 3flex enabled auto-merge (squash) November 15, 2025 21:04
@3flex 3flex merged commit a261c26 into detekt:main Nov 15, 2025
20 of 21 checks passed
@3flex 3flex deleted the align-ktlint-enabled branch November 15, 2025 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants