-
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
Open
dependabot
wants to merge
3
commits into
master
Choose a base branch
from
dependabot/gradle/io.gitlab.arturbosch.detekt-1.23.1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
the braces are optional. However, I assume that means we would have to move the
if
into the same line as theis ... ->
which might decrease readability too much:Or we write it like the following without braces, but that might look a bit weird?
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 defaultmultiLine=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.