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 4.1.2: Numbers of a float type should not be directly compared #323

Merged
merged 20 commits into from
Oct 6, 2020

Conversation

petertrr
Copy link
Member

@petertrr petertrr commented Sep 24, 2020

What's done:

  • Rule 4.1.2

This pull request closes #290

### What's done:
* Initial implementation
* Tests
### What's done:
* Update yml files and available-rules.md
### What's done:
* Added new rule to DiktatRuleSetProvider
* Added maven central badge
### What's done:
* Fixes
…float-ariphmethic

# 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
### What's done:
* Fixes
### What's done:
* Rule 4.1.2
@codecov
Copy link

codecov bot commented Sep 24, 2020

Codecov Report

Merging #323 into master will decrease coverage by 0.07%.
The diff coverage is 73.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #323      +/-   ##
============================================
- Coverage     82.81%   82.73%   -0.08%     
- Complexity     1187     1214      +27     
============================================
  Files            59       59              
  Lines          2950     2989      +39     
  Branches        934      952      +18     
============================================
+ Hits           2443     2473      +30     
- Misses          169      171       +2     
- Partials        338      345       +7     
Flag Coverage Δ Complexity Δ
#unittests 82.73% <73.33%> (-0.08%) 1214.00 <21.00> (+27.00) ⬇️

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

Impacted Files Coverage Δ Complexity Δ
...n/kotlin/org/cqfn/diktat/ruleset/utils/PsiUtils.kt 46.87% <0.00%> (+4.93%) 0.00 <0.00> (ø)
...set/rules/calculations/AccurateCalculationsRule.kt 78.37% <75.00%> (-4.96%) 45.00 <21.00> (+27.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 6434c2a...ecc6462. Read the comment docs.

Base automatically changed from feature/rule-4.1.1-float-ariphmethic to master September 24, 2020 19:37
# 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/kotlin/org/cqfn/diktat/ruleset/rules/calculations/AccurateCalculationsRule.kt
#	diktat-rules/src/main/resources/diktat-analysis-huawei.yml
#	diktat-rules/src/main/resources/diktat-analysis.yml
#	diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/AccurateCalculationsWarnTest.kt
### What's done:
* Rule 4.1.2
@petertrr petertrr marked this pull request as ready for review September 25, 2020 13:27
@orchestr7 orchestr7 changed the title Rule 4.1.2 Rule 4.1.2: Numbers of a float type should not be directly compared Sep 25, 2020
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

@petertrr petertrr merged commit e9b08f2 into master Oct 6, 2020
@petertrr petertrr deleted the feature/rule-4.1.2 branch October 6, 2020 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants