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

Set the default values of extendedIndentAfterOperators and extendedIndentBeforeDot to false #1342

Conversation

0x6675636b796f75676974687562
Copy link
Member

@0x6675636b796f75676974687562 0x6675636b796f75676974687562 commented Jun 1, 2022

What's done:

Actions checklist

  • Updated diktat-analysis.yml

@@ -226,7 +226,7 @@
- name: LONG_LINE
enabled: true
configuration:
lineLength: '180'
lineLength: '181'
Copy link
Member

Choose a reason for hiding this comment

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

why we changed this number?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because the increased indentation level (applied to our own codebase) results in longer lines, hence the need to increase the limit.

@0x6675636b796f75676974687562 0x6675636b796f75676974687562 force-pushed the bugfix/andrey.shcheglov/extendedIndentOfParameters-should-be-true branch from 4aa8a86 to 319d8ab Compare June 2, 2022 13:07
@0x6675636b796f75676974687562 0x6675636b796f75676974687562 changed the title Revert the default value of extendedIndentOfParameters back to true Set the default values of extendedIndentAfterOperators and extendedIndentBeforeDot to false Jun 2, 2022
@orchestr7
Copy link
Member

Where are tests that you have promised?
Will be in this PR?

@0x6675636b796f75676974687562
Copy link
Member Author

Where are tests that you have promised? Will be in this PR?

Yes, in this very PR.

I'm working on those.

…dIndentBeforeDot` to `false`

### What's done:

 * Since Kotlin style guide mentions no continuation indent,
   and IDEA defaults to no continuation indent as well,
   all `extendedIndent*` flags default to `false` from now on.
 * Closes: #1312
### What's done:

 * Reformatted the code so that it conforms to the new rules.
@0x6675636b796f75676974687562 0x6675636b796f75676974687562 force-pushed the bugfix/andrey.shcheglov/extendedIndentOfParameters-should-be-true branch from 319d8ab to f0f6ef8 Compare June 3, 2022 13:01
### What's done:

 * Unit tests adapted to the reformatted test resources.
 * Unit tests adapted to the new defaults.
@codecov
Copy link

codecov bot commented Jun 3, 2022

Codecov Report

Merging #1342 (36cbb9f) into master (92f2fef) will increase coverage by 0.04%.
The diff coverage is 68.19%.

@@             Coverage Diff              @@
##             master    #1342      +/-   ##
============================================
+ Coverage     83.52%   83.56%   +0.04%     
- Complexity     2563     2564       +1     
============================================
  Files           106      106              
  Lines          7278     7278              
  Branches       2017     2017              
============================================
+ Hits           6079     6082       +3     
  Misses          353      353              
+ Partials        846      843       -3     
Flag Coverage Δ
unittests 83.56% <68.19%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...t/common/config/reader/JsonResourceConfigReader.kt 41.66% <0.00%> (ø)
...fn/diktat/common/config/rules/RulesConfigReader.kt 32.20% <0.00%> (ø)
...tlin/org/cqfn/diktat/ruleset/constants/Warnings.kt 98.07% <ø> (ø)
...diktat/ruleset/rules/chapter3/TrailingCommaRule.kt 94.33% <ø> (ø)
...tat/ruleset/rules/chapter3/WhenMustHaveElseRule.kt 75.71% <0.00%> (ø)
.../cqfn/diktat/ruleset/rules/chapter5/CustomLabel.kt 85.71% <0.00%> (ø)
...cqfn/diktat/ruleset/rules/chapter6/UseLastIndex.kt 91.30% <0.00%> (ø)
...et/rules/chapter6/classes/CompactInitialization.kt 86.36% <0.00%> (ø)
.../ruleset/rules/chapter6/classes/DataClassesRule.kt 79.10% <14.28%> (ø)
...tlin/org/cqfn/diktat/ruleset/constants/Chapters.kt 69.23% <25.00%> (ø)
... and 62 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 92f2fef...36cbb9f. Read the comment docs.

@0x6675636b796f75676974687562 0x6675636b796f75676974687562 deleted the bugfix/andrey.shcheglov/extendedIndentOfParameters-should-be-true branch June 3, 2022 16:09
@nulls nulls added this to the 1.1.1 milestone Jun 17, 2022
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.

False positive finding for WRONG_INDENTATION
3 participants