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

Fixed LineLength #1759

Merged
merged 10 commits into from
Oct 16, 2023
Merged

Fixed LineLength #1759

merged 10 commits into from
Oct 16, 2023

Conversation

DrAlexD
Copy link
Member

@DrAlexD DrAlexD commented Oct 5, 2023

What's done:

  • Fixed bug when fix-result of rule LineLength execution still contained LineLength warnings. To fix this, added loop that trying to fix LineLength rule warnings until warnings run out.
  • Added MAX_FIX_NUMBER for limit on fixing to avoid infinite loop. If the limit is reached, then error message is displayed.
  • Added unFix() method realization inside FunAndProperty and ValueArgumentList classes to undo incorrect unnecessary fixes.
  • Fixed bug for case when long comment followed multiline property initialization.
  • Fixed and reworked several fix tests.

It's part of #1737

### What's done:
- Fixed bug when fix-result of rule `LineLength` execution still contained `LineLength` warnings. To fix this, added loop that trying to fix `LineLength` warnings until warnings run out.
- Added `unFix()` method realization inside `FunAndProperty` and `ValueArgumentList` classes to undo unnecessary fixes.
- Fixed bug for case when long comment followed multiline property initialization.
- Fixed and reworked several fix tests.

It's part of saveourtool#1737
@DrAlexD DrAlexD added bug Something isn't working tests Improve testing labels Oct 5, 2023
@DrAlexD DrAlexD added this to the 2.0.0 milestone Oct 5, 2023
@DrAlexD DrAlexD self-assigned this Oct 5, 2023
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

detekt found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.

@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

Merging #1759 (3908f06) into master (71c81d4) will increase coverage by 1.15%.
The diff coverage is 71.69%.

@@             Coverage Diff              @@
##             master    #1759      +/-   ##
============================================
+ Coverage     77.09%   78.25%   +1.15%     
- Complexity     2376     2410      +34     
============================================
  Files           126      126              
  Lines          8408     8451      +43     
  Branches       2131     2148      +17     
============================================
+ Hits           6482     6613     +131     
+ Misses          976      880      -96     
- Partials        950      958       +8     
Files Coverage Δ
...urtool/diktat/ruleset/rules/chapter3/LineLength.kt 81.47% <71.69%> (+25.12%) ⬆️

... and 1 file with indirect coverage changes

@DrAlexD DrAlexD enabled auto-merge (squash) October 6, 2023 10:03
@DrAlexD DrAlexD disabled auto-merge October 6, 2023 14:15
@kgevorkyan kgevorkyan requested a review from nulls October 9, 2023 08:45
@DrAlexD DrAlexD enabled auto-merge (squash) October 16, 2023 10:52
@DrAlexD DrAlexD merged commit acb3a1c into saveourtool:master Oct 16, 2023
26 of 27 checks passed
@DrAlexD DrAlexD deleted the feature/fix-line-length branch October 16, 2023 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tests Improve testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants