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

New rule 5.2.4 for lambda length #705

Merged
merged 5 commits into from
Jan 18, 2021
Merged

New rule 5.2.4 for lambda length #705

merged 5 commits into from
Jan 18, 2021

Conversation

Cheshiriks
Copy link
Member

@Cheshiriks Cheshiriks commented Jan 13, 2021

What's done:

  • Added rule logic
  • Added new warning
  • Added new test

Which rule and warnings did you add?

This pull request closes #695

Actions checklist

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

@codecov
Copy link

codecov bot commented Jan 13, 2021

Codecov Report

Merging #705 (ccf1b2b) into master (373b609) will increase coverage by 0.02%.
The diff coverage is 85.36%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #705      +/-   ##
============================================
+ Coverage     80.09%   80.11%   +0.02%     
- Complexity     1887     1893       +6     
============================================
  Files            89       90       +1     
  Lines          4883     4909      +26     
  Branches       1566     1573       +7     
============================================
+ Hits           3911     3933      +22     
  Misses          238      238              
- Partials        734      738       +4     
Flag Coverage Δ Complexity Δ
unittests 80.11% <85.36%> (+0.02%) 0.00 <15.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> (ø)
.../cqfn/diktat/ruleset/rules/BlockStructureBraces.kt 79.64% <60.00%> (ø) 54.00 <2.00> (ø)
...rg/cqfn/diktat/ruleset/rules/files/NewlinesRule.kt 81.70% <60.00%> (ø) 129.00 <0.00> (ø)
.../diktat/ruleset/rules/MultipleModifiersSequence.kt 91.48% <71.42%> (ø) 14.00 <0.00> (ø)
.../org/cqfn/diktat/ruleset/rules/LambdaLengthRule.kt 81.81% <81.81%> (ø) 8.00 <8.00> (?)
...lin/org/cqfn/diktat/ruleset/rules/SmartCastRule.kt 64.46% <87.50%> (ø) 36.00 <3.00> (ø)
...n/diktat/ruleset/rules/SingleLineStatementsRule.kt 93.33% <88.88%> (ø) 5.00 <2.00> (ø)
...tlin/org/cqfn/diktat/ruleset/constants/Warnings.kt 97.72% <100.00%> (+0.01%) 11.00 <0.00> (ø)
...cqfn/diktat/ruleset/rules/DiktatRuleSetProvider.kt 93.26% <100.00%> (+0.06%) 11.00 <0.00> (ø)
...in/org/cqfn/diktat/ruleset/rules/FunctionLength.kt 77.77% <100.00%> (-1.17%) 7.00 <0.00> (-2.00)
... and 5 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 373b609...ccf1b2b. Read the comment docs.

Copy link
Member

@petertrr petertrr left a comment

Choose a reason for hiding this comment

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

Good start, just needs a little polishing :)

@Cheshiriks Cheshiriks force-pushed the feature/length-lambda branch 2 times, most recently from bbda586 to feef0d8 Compare January 14, 2021 11:46
@Cheshiriks Cheshiriks self-assigned this Jan 14, 2021
@Cheshiriks Cheshiriks force-pushed the feature/length-lambda branch 2 times, most recently from b59a74a to 9ba3f0a Compare January 14, 2021 16:46
@Cheshiriks Cheshiriks force-pushed the feature/length-lambda branch 3 times, most recently from 1f231cf to e3ac7f1 Compare January 15, 2021 16:10
Copy link
Member

@petertrr petertrr left a comment

Choose a reason for hiding this comment

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

Just a couple of minor notes, almost done.

@Cheshiriks Cheshiriks force-pushed the feature/length-lambda branch from e3ac7f1 to 65868f2 Compare January 18, 2021 08:31
### What's done:
* Added rule logic
* Added new warning
* Added new test
### What's done:
* Added rule logic
* Added new warning
* Added new test
### What's done:
* Added rule logic
* Added new warning
* Added new test
### What's done:
* Added rule logic
* Added new warning
* Added new test
@Cheshiriks Cheshiriks force-pushed the feature/length-lambda branch from 65868f2 to 1021323 Compare January 18, 2021 08:48
### What's done:
* Added rule logic
* Added new warning
* Added new test
@Cheshiriks Cheshiriks force-pushed the feature/length-lambda branch from 1021323 to ccf1b2b Compare January 18, 2021 08:54
@Cheshiriks Cheshiriks merged commit 0b61701 into master Jan 18, 2021
@petertrr petertrr deleted the feature/length-lambda branch January 27, 2021 12:57
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.

Long lambdas should have a parameter name instead of it
2 participants