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

[#1347] Indent only TEMPLATE_ENTRY nodes immediately following a newline #1387

Conversation

0x6675636b796f75676974687562
Copy link
Member

What's done:

Actions checklist

  • Added tests on fixers

…wline

### What's done:

 * Now, only those `LITERAL_STRING_TEMPLATE_ENTRY` nodes which immediately
   follow a newline are indented.
 * Additionally, with this change, `trimIndent()` and `trimMargin(...)` calls
   are more reliably detected.
 * This fixes #1347.
@github-actions
Copy link
Contributor

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

1 261 tests   1 245 ✔️  9m 19s ⏱️
   151 suites       16 💤
   151 files           0

Results for commit 826a25d.

@github-actions
Copy link
Contributor

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

1 261 tests   1 245 ✔️  8m 12s ⏱️
   151 suites       16 💤
   151 files           0

Results for commit 826a25d.

@codecov
Copy link

codecov bot commented Jun 21, 2022

Codecov Report

Merging #1387 (1591d9e) into master (d96621e) will decrease coverage by 0.12%.
The diff coverage is 56.75%.

@@             Coverage Diff              @@
##             master    #1387      +/-   ##
============================================
- Coverage     83.43%   83.30%   -0.13%     
+ Complexity     2555     2554       -1     
============================================
  Files           107      107              
  Lines          7557     7565       +8     
  Branches       2087     2090       +3     
============================================
- Hits           6305     6302       -3     
- Misses          368      373       +5     
- Partials        884      890       +6     
Flag Coverage Δ
unittests 83.30% <56.75%> (-0.13%) ⬇️

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

Impacted Files Coverage Δ
...at/ruleset/rules/chapter3/files/IndentationRule.kt 78.73% <56.75%> (-4.37%) ⬇️

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 d96621e...1591d9e. Read the comment docs.

@0x6675636b796f75676974687562 0x6675636b796f75676974687562 added autofix Issues related to diktat in autofix mode tests Improve testing labels Jun 21, 2022
@orchestr7
Copy link
Member

lgtm

…wline

### What's done:

 * Minor code clean-up.
@0x6675636b796f75676974687562 0x6675636b796f75676974687562 deleted the feature/andrey.shcheglov/indentation-unit-tests branch June 21, 2022 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autofix Issues related to diktat in autofix mode tests Improve testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WRONG_INDENTATION: running mvn diktat:fix adds whitespace to string literals
2 participants