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

Rule 5.1.2: Avoid deep nesting of function code blocks #348

Merged
merged 11 commits into from
Oct 9, 2020

Conversation

kentr0w
Copy link
Collaborator

@kentr0w kentr0w commented Oct 2, 2020

Actions checklist

### What's done:
   create rule
### What's done:
   create rule
### What's done:
    Made rule
@kentr0w kentr0w added the enhancement New feature or request label Oct 2, 2020
@kentr0w kentr0w requested review from petertrr and aktsay6 October 2, 2020 12:52
# Conflicts:
#	diktat-analysis.yml
#	diktat-rules/src/main/kotlin/generated/WarningNames.kt
#	diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/constants/Warnings.kt
#	diktat-rules/src/main/resources/diktat-analysis-huawei.yml
#	diktat-rules/src/main/resources/diktat-analysis.yml
#	info/available-rules.md
@codecov
Copy link

codecov bot commented Oct 2, 2020

Codecov Report

Merging #348 into master will decrease coverage by 0.00%.
The diff coverage is 82.60%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #348      +/-   ##
============================================
- Coverage     83.00%   83.00%   -0.01%     
- Complexity     1252     1263      +11     
============================================
  Files            61       62       +1     
  Lines          3101     3124      +23     
  Branches        986      993       +7     
============================================
+ Hits           2574     2593      +19     
  Misses          169      169              
- Partials        358      362       +4     
Flag Coverage Δ Complexity Δ
#unittests 83.00% <82.60%> (-0.01%) 1263.00 <11.00> (+11.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> (ø)
...g/cqfn/diktat/ruleset/rules/NestedFunctionBlock.kt 80.95% <80.95%> (ø) 11.00 <11.00> (?)
...tlin/org/cqfn/diktat/ruleset/constants/Warnings.kt 97.05% <100.00%> (+0.02%) 9.00 <0.00> (ø)
...cqfn/diktat/ruleset/rules/DiktatRuleSetProvider.kt 98.07% <100.00%> (+0.03%) 3.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 84bd80f...172c561. Read the comment docs.

### What's done:
    Fixed suppress
### What's done:
    Fixed suppress
@orchestr7 orchestr7 changed the title Rule 5.1.2 Rule 5.1.2: Avoid deep nesting of function code blocks Oct 5, 2020
### What's done:
   Added more handle
@kentr0w kentr0w requested a review from petertrr October 7, 2020 11:23
### What's done:
  Changed all logic
### What's done:
  Fixed bugs after review
### What's done:
  Fixed bugs after review
# Conflicts:
#	diktat-analysis.yml
#	diktat-rules/src/main/kotlin/generated/WarningNames.kt
#	diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/constants/Warnings.kt
#	diktat-rules/src/main/resources/diktat-analysis-huawei.yml
#	diktat-rules/src/main/resources/diktat-analysis.yml
#	info/available-rules.md
@kentr0w kentr0w merged commit 1303570 into master Oct 9, 2020
@kentr0w kentr0w deleted the feature/rule-5.1.2 branch October 9, 2020 15:11
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.

Rule 5.1.2 Avoid deep nesting of function code blocks. It should be limited to 4 levels
2 participants