-
Notifications
You must be signed in to change notification settings - Fork 6
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
Bump io.gitlab.arturbosch.detekt from 1.23.0 to 1.23.1 #812
base: master
Are you sure you want to change the base?
Bump io.gitlab.arturbosch.detekt from 1.23.0 to 1.23.1 #812
Conversation
Bumps [io.gitlab.arturbosch.detekt](https://github.com/detekt/detekt) from 1.23.0 to 1.23.1. - [Release notes](https://github.com/detekt/detekt/releases) - [Commits](detekt/detekt@v1.23.0...v1.23.1) --- updated-dependencies: - dependency-name: io.gitlab.arturbosch.detekt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Otherwise code might not be that readable anymore
@Suppress("detekt:OptionalWhenBraces") | ||
when (it) { | ||
is OperationNotNeededModuleResponse -> { | ||
if (config[Arisa.Debug.logOperationNotNeeded]) { |
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.
Have suppressed this, because it was apparently reporting that for
is OperationNotNeededModuleResponse -> {
if (config[Arisa.Debug.logOperationNotNeeded]) {
...
}
}
the braces are optional. However, I assume that means we would have to move the if
into the same line as the is ... ->
which might decrease readability too much:
is OperationNotNeededModuleResponse -> if (config[Arisa.Debug.logOperationNotNeeded]) {
...
}
Or we write it like the following without braces, but that might look a bit weird?
is OperationNotNeededModuleResponse ->
if (config[Arisa.Debug.logOperationNotNeeded]) {
...
}
What do you think?
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 second one looks fine to me. if detekt accepts that, i think that'd be better than suppressing.
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.
Hmm, that OptionalWhenBraces
rule is actually deprecated (see documentation), and not enabled by default (we just enable all rules in the build script).
Maybe it is also a bug that this rule now reports this issue, because at least the release notes don't seem to mention anything about this. And on the other hand while the second variant (without braces) seems to be accepted, I am bit surprised about that because I would expect that BracesOnWhenStatements
with its default multiLine=consistent
should prevent that.
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.
Maybe it's worth thinking about making the formatting rules less strict then, by not requiring literally every rule to pass? I'd assume there are some presets that are less pedantic.
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.
There is https://github.com/detekt/detekt/blob/main/detekt-core/src/main/resources/default-detekt-config.yml (but that also disables some non-style rules); not sure if there are any other default configs.
Maybe we can also just wait and see if the behavior changes in the version released after 1.23.1, whenever that might be.
A newer version of io.gitlab.arturbosch.detekt exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged. |
Bumps io.gitlab.arturbosch.detekt from 1.23.0 to 1.23.1.
Release notes
Sourced from io.gitlab.arturbosch.detekt's releases.
Commits
c50ed69
Prepare Detekt 1.23.1 (#6320)fa788eb
Deprecate OptionalWhenBraces rule (#6314)2865763
Add missing jdkHome and languageVersion properties to DetektCreateBaselineTas...21482e0
Reflect Java 20 support in CLI help output (#6277)468af4c
Update dependency gradle to v8.2.1 (#6274)bc249ab
Switch to SLF4J 2.x (#6266)8687e2a
Make InvalidRange aware of rangeUntil operator (#6264)efbcd94
Update kotlin monorepo to v1.9.0 (#6258)7ee3b8a
Update dependency com.pinterest.ktlint:ktlint-ruleset-standard to v0.50.0 (#6...e44a7e8
MaxChainedCallsOnSameLine: don't count class references as chained calls (#6224)You can trigger a rebase of this PR by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)