Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jul 31, 2023

Bumps io.gitlab.arturbosch.detekt from 1.23.0 to 1.23.1.

Release notes

Sourced from io.gitlab.arturbosch.detekt's releases.

v1.23.1

1.23.1 - 2023-07-30

This is a point release for Detekt 1.23.0, where we added support for Kotlin 1.9.0 and fixed several bugs that got reported by the community.

Notable Changes
  • Bumped Kotlin to v1.9.0 - #6258
  • Bumped KtLint to v0.50.0 - #6239
  • Updated CLI to reflect Java 20 support - #6277
Changelog
  • Add missing jdkHome and languageVersion properties to DetektCreateBaselineTask - #6284
  • Make InvalidRange aware of rangeUntil operator - #6264
  • MaxChainedCallsOnSameLine: don't count class references as chained calls - #6224
  • CanBeNonNullable: Fix false positive when property is defined after assignment - #6210
  • Add ..< and rangeTo in the ForEachOnRange rule - #6197
  • Don't report UseDataClass if class contains non-property parameters - #6173
  • Allow documenting public fun name when same private variable is present - #6165
  • Find range call using recursion - #6164
  • StringShouldBeRawString: Ignore replaceIndent and prependIndent - #6154
  • UnusedPrivateProperty: Fix false postive by ignoring data classes - #6151
  • PropertyUsedBeforeDeclaration: fix false positive in nested/inner class - #6139
Dependency Updates
  • Update dependency gradle to v8.2.1 - #6274
  • Switch to SLF4J 2.x - #6266
  • Update kotlin monorepo to v1.8.22 - #6192
Contributors

We would like to thank the following contributors that made this release possible: @​3flex, @​Goooler, @​Hexcles, @​PoisonedYouth, @​TWiStErRob, @​VirtualParticle, @​atulgpt, @​cortinico, @​dzirbel, @​eygraber, @​marschwar, @​rmarquis, @​segunfamisa, @​severn-everett, @​t-kameyama

See all commit history here

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)
  • Additional commits viewable in compare view

Dependabot compatibility score

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)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

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]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jul 31, 2023
Otherwise code might not be that readable anymore
Comment on lines +28 to 31
@Suppress("detekt:OptionalWhenBraces")
when (it) {
is OperationNotNeededModuleResponse -> {
if (config[Arisa.Debug.logOperationNotNeeded]) {
Copy link
Contributor

@Marcono1234 Marcono1234 Aug 2, 2023

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?

Copy link
Member

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.

Copy link
Contributor

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.

Copy link
Member

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.

Copy link
Contributor

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.

Copy link
Contributor Author

dependabot bot commented on behalf of github Mar 18, 2024

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.

@urielsalis urielsalis enabled auto-merge (squash) March 18, 2024 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants