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 for boolean expressions #909

Merged
merged 16 commits into from
Jun 8, 2021
Merged

Bugfix for boolean expressions #909

merged 16 commits into from
Jun 8, 2021

Conversation

petertrr
Copy link
Member

@petertrr petertrr commented Jun 4, 2021

What's done:

  • Fixed logic in boolean expression formatter
  • Added tests
  • Enabled de Morgan's law for boolean expression simplification
  • Fixed code style

Which rule and warnings did you add?

This pull request closes #908

TODO:

  • Support xor

### What's done:
* Fixed logic
* Added tests
@codecov
Copy link

codecov bot commented Jun 4, 2021

Codecov Report

Merging #909 (9e29d65) into master (0218da1) will decrease coverage by 0.01%.
The diff coverage is 89.13%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #909      +/-   ##
============================================
- Coverage     84.19%   84.18%   -0.02%     
- Complexity     2357     2373      +16     
============================================
  Files           101      101              
  Lines          5981     6002      +21     
  Branches       1762     1772      +10     
============================================
+ Hits           5036     5053      +17     
- Misses          257      260       +3     
- Partials        688      689       +1     
Flag Coverage Δ
unittests 84.18% <89.13%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
...diktat/ruleset/rules/chapter2/kdoc/KdocComments.kt 85.18% <50.00%> (ø)
.../diktat/ruleset/rules/chapter1/IdentifierNaming.kt 83.73% <60.00%> (-0.42%) ⬇️
...iktat/ruleset/rules/chapter3/files/NewlinesRule.kt 78.35% <66.66%> (ø)
...t/ruleset/rules/chapter3/BooleanExpressionsRule.kt 92.92% <96.87%> (-2.14%) ⬇️
...les/chapter4/VariableGenericTypeDeclarationRule.kt 79.31% <100.00%> (ø)
...diktat/ruleset/rules/chapter6/AvoidUtilityClass.kt 77.27% <100.00%> (ø)
.../cqfn/diktat/ruleset/rules/chapter6/RunInScript.kt 92.30% <100.00%> (ø)
...tlin/org/cqfn/diktat/ruleset/utils/AstConstants.kt 100.00% <100.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 0218da1...9e29d65. Read the comment docs.

### What's done:
* Code style
### What's done:
* Handle cases with nested expressions and multi-line expressions
* Code style
### What's done:
* Fixes
### What's done:
* Fixes
### What's done:
* Fixes
### What's done:
* Fixes
### What's done:
* Fixes
### What's done:
* Test refactoring
### What's done:
* Refactoring
### What's done:
* De Morgan law
### What's done:
* De Morgan law
@petertrr petertrr marked this pull request as ready for review June 8, 2021 09:56
### What's done:
* Code style
### What's done:
* Code style
@petertrr petertrr merged commit eda9604 into master Jun 8, 2021
@petertrr petertrr deleted the bugfix/boolean#908 branch June 8, 2021 11:54
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.

A lot of messages like no viable alternative at character, probably because of ANTLR library
3 participants