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 of NPE in LongLine rule on Binary Expressions #932

Merged
merged 11 commits into from
Jun 21, 2021

Conversation

kgevorkyan
Copy link
Member

@kgevorkyan kgevorkyan commented Jun 17, 2021

What's done:

  • Fix bug with NPE: we didn't consider, that offset changes in course of fixes, so it's break the logic sometimes
  • Add additional check for long comments: if there is only one white space, which is located after // - we shouldn't fix split it
  • Add tests

### What's done:
* WIP
### What's done:
* few fixes
### What's done:
* Fix bug with NPE in comments
* WIP: bug with npe in string templates
### What's done:
* polish
### What's done:
* Create test for bug discovering
### What's done:
* debug
### What's done:
* Merge master branch
@kgevorkyan kgevorkyan linked an issue Jun 17, 2021 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jun 17, 2021

Codecov Report

Merging #932 (ff61ff5) into master (3dc16b2) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #932   +/-   ##
=========================================
  Coverage     84.15%   84.15%           
- Complexity     2374     2375    +1     
=========================================
  Files           101      101           
  Lines          6008     6010    +2     
  Branches       1773     1773           
=========================================
+ Hits           5056     5058    +2     
  Misses          263      263           
  Partials        689      689           
Flag Coverage Δ
unittests 84.15% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...g/cqfn/diktat/ruleset/rules/chapter3/LineLength.kt 91.86% <100.00%> (+0.07%) ⬆️

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 3dc16b2...ff61ff5. Read the comment docs.

### What's done:
* fix bug
@kgevorkyan kgevorkyan force-pushed the bugfix/npe_in_longline_on_binary_expr branch from 144af71 to c8ebbe5 Compare June 17, 2021 12:34
@kgevorkyan
Copy link
Member Author

Please take a look for a explanation, if changes are unclear

@kgevorkyan kgevorkyan requested review from petertrr and orchestr7 June 17, 2021 12:54
@kgevorkyan kgevorkyan marked this pull request as ready for review June 17, 2021 12:54
@kgevorkyan kgevorkyan mentioned this pull request Jun 18, 2021
3 tasks
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.

LGTM, sounds like it was a really tricky bug

### What's done:
* Add review suggestions
@kgevorkyan kgevorkyan requested a review from petertrr June 21, 2021 09:07
@kgevorkyan kgevorkyan merged commit 8e04338 into master Jun 21, 2021
@kgevorkyan kgevorkyan deleted the bugfix/npe_in_longline_on_binary_expr branch June 21, 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.

NPE in LONG_LINE rule on Binary Expressions
3 participants