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

Bugfix. Sanitize diktat config(#737) #759

Merged
merged 3 commits into from
Feb 8, 2021

Conversation

aktsay6
Copy link
Collaborator

@aktsay6 aktsay6 commented Feb 8, 2021

What's done:

  • Renamed an inspection (FIRST_COMMENT_NO_SPACE to FIRST_COMMENT_NO_BLANK_LINE)
  • Checked config files

This pull request closes #737

Actions checklist

  • Implemented Rule, added Warnings
  • Added tests on checks
  • Added tests on fixers
  • Updated diktat-analysis.yml
  • Updated available-rules.md

### What's done:
  * Watched config files
### What's done:
  * Renamed an inspection
  * Checked yml configuration
@aktsay6 aktsay6 added the bug Something isn't working label Feb 8, 2021
@aktsay6 aktsay6 requested review from petertrr and kentr0w February 8, 2021 09:26
@codecov
Copy link

codecov bot commented Feb 8, 2021

Codecov Report

Merging #759 (003c172) into master (d8e644e) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #759      +/-   ##
============================================
- Coverage     79.75%   79.73%   -0.02%     
  Complexity     2016     2016              
============================================
  Files            97       97              
  Lines          5074     5074              
  Branches       1621     1621              
============================================
- Hits           4047     4046       -1     
  Misses          246      246              
- Partials        781      782       +1     
Flag Coverage Δ Complexity Δ
unittests 79.73% <100.00%> (-0.02%) 0.00 <0.00> (ø)

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

Impacted Files Coverage Δ Complexity Δ
...at-rules/src/main/kotlin/generated/WarningNames.kt 0.00% <ø> (ø) 0.00 <0.00> (ø)
...tlin/org/cqfn/diktat/ruleset/constants/Warnings.kt 97.82% <100.00%> (ø) 12.00 <0.00> (ø)
.../ruleset/rules/chapter2/kdoc/CommentsFormatting.kt 65.77% <100.00%> (ø) 76.00 <0.00> (ø)
...iktat/ruleset/rules/chapter3/files/NewlinesRule.kt 81.11% <0.00%> (-0.43%) 129.00% <0.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 d8e644e...003c172. Read the comment docs.

@@ -77,7 +77,7 @@ enum class Warnings(
HEADER_NOT_BEFORE_PACKAGE(true, "2.2.1", "header KDoc should be placed before package and imports"),
COMMENTED_OUT_CODE(false, "2.4.2", "you should not comment out code, use VCS to save it in history and delete this block"),
WRONG_NEWLINES_AROUND_KDOC(true, "2.4.1", "there should be a blank line above the kDoc and there should not be no blank lines after kDoc"),
FIRST_COMMENT_NO_SPACES(true, "2.4.1", "there should not be any spaces before first comment"),
FIRST_COMMENT_NO_BLANK_LINE(true, "2.4.1", "there should not be any blank lines before first comment"),
Copy link
Member

Choose a reason for hiding this comment

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

What does it check once again? Is this a first comment in the file? How is this different from blank lines rule?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It checks that first comment starts with new line. BlankLinesRule handles blank lines in blocks before/after braces. Seems like blank lines before first comment have more complicated logic.

Copy link
Member

Choose a reason for hiding this comment

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

ok then

@aktsay6 aktsay6 merged commit 474f94f into master Feb 8, 2021
@aktsay6 aktsay6 deleted the bugfix/sanitize-diktat-config(#737) branch February 8, 2021 15:01
lutovich added a commit to lutovich/spotless that referenced this pull request Jan 4, 2022
FIRST_COMMENT_NO_SPACES rule renamed to FIRST_COMMENT_NO_BLANK_LINE
in saveourtool/diktat#759.

Update explicit version to 1.0.1.

Remove copyright header rules because we do not want DiKTat tests to
fail every new year.
lutovich added a commit to lutovich/spotless that referenced this pull request Jan 4, 2022
FIRST_COMMENT_NO_SPACES rule renamed to FIRST_COMMENT_NO_BLANK_LINE
in saveourtool/diktat#759.

Update explicit version to 1.0.1.

Remove copyright header rules because we do not want DiKTat tests to
fail every New Year.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check default diktat config for sanity
2 participants