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

Add an extendedIndentForExpressionBodies flag to the WRONG_INDENTATION check #1443

Merged

Conversation

0x6675636b796f75676974687562
Copy link
Member

What's done:

  • This commit adds a separate extendedIndentForExpressionBodies flag,
    defaulting to false.
  • The flag controls whether continuation indent is used to indent expression
    bodies (previously, controlled with extendedIndentAfterOperators).
  • The corresponding flags are:
    • IDEA: CONTINUATION_INDENT_FOR_EXPRESSION_BODIES
    • .editorconfig: ij_kotlin_continuation_indent_for_expression_bodies

Which rule and warnings did you add?

  • WRONG_INDENTATION
    • extendedIndentForExpressionBodies

Actions checklist

  • Implemented Rule, added Warnings
  • Updated diktat-analysis.yml
  • Updated available-rules.md

…TION` check

### What's done:

 * This commit adds a separate `extendedIndentForExpressionBodies` flag,
   defaulting to `false`.
 * The flag controls whether continuation indent is used to indent expression
   bodies (previously, controlled with `extendedIndentAfterOperators`).
 * The corresponding flags are:
   * _IDEA_: `CONTINUATION_INDENT_FOR_EXPRESSION_BODIES`
   * `.editorconfig`: `ij_kotlin_continuation_indent_for_expression_bodies`
@codecov
Copy link

codecov bot commented Jul 12, 2022

Codecov Report

Merging #1443 (93575ec) into master (ad8718b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##             master    #1443   +/-   ##
=========================================
  Coverage     83.23%   83.23%           
- Complexity     2560     2562    +2     
=========================================
  Files           107      107           
  Lines          7618     7619    +1     
  Branches       2103     2103           
=========================================
+ Hits           6341     6342    +1     
  Misses          388      388           
  Partials        889      889           
Flag Coverage Δ
unittests 83.23% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
.../cqfn/diktat/ruleset/utils/indentation/Checkers.kt 82.20% <100.00%> (ø)
...tat/ruleset/utils/indentation/IndentationConfig.kt 100.00% <100.00%> (ø)

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 ad8718b...93575ec. Read the comment docs.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 12, 2022

JUnit Tests (Windows, EnricoMi/publish-unit-test-result-action@v1)

1 286 tests   1 271 ✔️  1m 30s ⏱️
   159 suites       15 💤
   159 files           0

Results for commit 4d07ceb.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 12, 2022

JUnit Tests (macOS, EnricoMi/publish-unit-test-result-action@v1)

1 286 tests   1 271 ✔️  1m 30s ⏱️
   159 suites       15 💤
   159 files           0

Results for commit 4d07ceb.

♻️ This comment has been updated with latest results.

### What's done:

 * `appendix.tex` changed.
@0x6675636b796f75676974687562 0x6675636b796f75676974687562 deleted the bugfix/andrey.shcheglov/indentation branch July 13, 2022 10:16
0x6675636b796f75676974687562 added a commit that referenced this pull request Jul 13, 2022
### What's done:

 * Once we now have a separate flag for assignment
   (`extendedIndentForExpressionBodies`, `false` by default, see #1443), let's set
   `extendedIndentAfterOperators` back to `true` to be consistent with how IDEA
   formats Kotlin source files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[WRONG_INDENTATION] false positive warning on functions without body
2 participants