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

Magic Number #772

Merged
merged 12 commits into from
Mar 22, 2021
Merged

Magic Number #772

merged 12 commits into from
Mar 22, 2021

Conversation

kentr0w
Copy link
Collaborator

@kentr0w kentr0w commented Feb 12, 2021

What's done:

Magic number

Actions checklist

### What's done:
   Implemented rule, added test and documentation
@kentr0w kentr0w added the enhancement New feature or request label Feb 12, 2021
### What's done:
   Implemented rule, added test and documentation
@codecov
Copy link

codecov bot commented Feb 13, 2021

Codecov Report

Merging #772 (f290802) into master (8a7a2df) will increase coverage by 0.02%.
The diff coverage is 81.81%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #772      +/-   ##
============================================
+ Coverage     80.92%   80.95%   +0.02%     
- Complexity     2221     2248      +27     
============================================
  Files            98       99       +1     
  Lines          5694     5738      +44     
  Branches       1767     1783      +16     
============================================
+ Hits           4608     4645      +37     
  Misses          286      286              
- Partials        800      807       +7     
Flag Coverage Δ Complexity Δ
unittests 80.95% <81.81%> (+0.02%) 0.00 <27.00> (ø)

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

Impacted Files Coverage Δ Complexity Δ
...g/cqfn/diktat/ruleset/rules/chapter3/LineLength.kt 86.60% <ø> (ø) 77.00 <0.00> (ø)
...n/diktat/ruleset/rules/chapter3/MagicNumberRule.kt 80.95% <80.95%> (ø) 27.00 <27.00> (?)
...tlin/org/cqfn/diktat/ruleset/constants/Warnings.kt 97.90% <100.00%> (+0.01%) 12.00 <0.00> (ø)
...cqfn/diktat/ruleset/rules/DiktatRuleSetProvider.kt 92.17% <100.00%> (+0.06%) 11.00 <0.00> (ø)
...tlin/org/cqfn/diktat/ruleset/utils/AstNodeUtils.kt 81.45% <0.00%> (+0.40%) 0.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 8a7a2df...f290802. Read the comment docs.

### What's done:
   Fixed according to our code style
### What's done:
   Fixed according to our code style
### What's done:
   Fixed according to our code style
### What's done:
   Fixed according to our code style
### What's done:
   Fixed according to our code style
### What's done:
   Fixed according to our code style
Copy link
Member

@orchestr7 orchestr7 left a comment

Choose a reason for hiding this comment

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

what rule do we have in a code style for this. Will you add? Or we have existing?

@kentr0w kentr0w marked this pull request as ready for review February 28, 2021 19:11
@kentr0w
Copy link
Collaborator Author

kentr0w commented Feb 28, 2021

No, we didn't have a rule for that. So I added this rule to chapter 3

### What's done:
Fixed after review
### What's done:
Fixed according to our code-style
info/guide/guide-chapter-3.md Outdated Show resolved Hide resolved
info/guide/guide-chapter-3.md Outdated Show resolved Hide resolved
### What's done:
Fixed after review
Copy link
Member

@orchestr7 orchestr7 left a comment

Choose a reason for hiding this comment

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

Lgtm

@kentr0w kentr0w merged commit d508bd7 into master Mar 22, 2021
@kentr0w kentr0w deleted the feature/magic-number branch March 22, 2021 17:50
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.

Magic number: rule is not supported in the diktat
3 participants