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

NPE in NewlinesRule.kt #1853

Merged
merged 2 commits into from
Dec 11, 2023
Merged

Conversation

diphtongue
Copy link
Contributor

What's done:

  • Fixed NPE on test

Closes #1779

- Fixed NPE on test

Closes #1779
Copy link

codecov bot commented Dec 11, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (65d5558) 78.45% compared to head (ff6f34a) 78.42%.

Files Patch % Lines
...iktat/ruleset/rules/chapter3/files/NewlinesRule.kt 57.14% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1853      +/-   ##
============================================
- Coverage     78.45%   78.42%   -0.03%     
  Complexity     2442     2442              
============================================
  Files           133      133              
  Lines          8630     8632       +2     
  Branches       2176     2179       +3     
============================================
- Hits           6771     6770       -1     
  Misses          896      896              
- Partials        963      966       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

JUnit Tests (macOS, EnricoMi/publish-unit-test-result-action@v2)

   164 files     164 suites   6m 10s ⏱️
1 409 tests 1 373 ✔️ 36 💤 0
2 788 runs  2 752 ✔️ 36 💤 0

Results for commit 550d4a4.

Copy link
Contributor

JUnit Tests (Windows, EnricoMi/publish-unit-test-result-action@v2)

   164 files     164 suites   7m 9s ⏱️
1 409 tests 1 392 ✔️ 17 💤 0
2 788 runs  2 771 ✔️ 17 💤 0

Results for commit 550d4a4.

@diphtongue diphtongue marked this pull request as ready for review December 11, 2023 08:45
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.

Looks good as a workaround.
The problem was that we really expected that after all COMMA we have a newline.
We did not expect that there is a possibility when someone will put a trailing comma after arguments and then a ->

@diphtongue diphtongue merged commit 3059a40 into master Dec 11, 2023
18 of 19 checks passed
@diphtongue diphtongue deleted the bugfix/null-pointer-in-newlines-rule branch December 11, 2023 09:14
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 NewlinesRule.kt
3 participants