Skip to content

Improve code style#121

Merged
Borewit merged 2 commits into
mainfrom
codeStyle
Feb 28, 2023
Merged

Improve code style#121
Borewit merged 2 commits into
mainfrom
codeStyle

Conversation

@Borewit

@Borewit Borewit commented Feb 27, 2023

Copy link
Copy Markdown
Owner

Improve code style of:

  • MultiListBatchClosestMatchResultsDialog.java
  • PlaylistEditCtrl.java
  • Resolved 156 code smells:

image

@Borewit Borewit added the internal Excluded from release notes label Feb 27, 2023
@Borewit Borewit self-assigned this Feb 27, 2023
@Borewit Borewit changed the title Improve code style MultiListBatchClosestMatchResultsDialog Improve code style Feb 27, 2023
return button;
}

private void onBtnLocateActionPerformed(java.awt.event.ActionEvent evt)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

24% of developers fix this issue

UnusedMethod: Method 'onBtnLocateActionPerformed' is never used.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]


private void onMenuEditFilenameActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_onMenuEditFilenameActionPerformed
{//GEN-HEADEREND:event_onMenuEditFilenameActionPerformed
private void onMenuEditFilenameActionPerformed(java.awt.event.ActionEvent evt)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

7% of developers fix this issue

UnnecessarilyFullyQualified: This fully qualified name is unambiguous to the compiler if imported.


Suggested change
private void onMenuEditFilenameActionPerformed(java.awt.event.ActionEvent evt)
private void onBtnLocateActionPerformed(ActionEvent evt)

❗❗ 4 similar findings have been found in this PR

🔎 Expand here to view all instances of this finding
File Path Line Number
src/main/java/listfix/view/controls/PlaylistEditCtrl.java 846
src/main/java/listfix/view/controls/PlaylistEditCtrl.java 861
src/main/java/listfix/view/controls/PlaylistEditCtrl.java 851
src/main/java/listfix/view/controls/PlaylistEditCtrl.java 838

Visit the Lift Web Console to find more details in your report.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

@sonatype-lift

sonatype-lift Bot commented Feb 27, 2023

Copy link
Copy Markdown

🛠 Lift Auto-fix

Some of the Lift findings in this PR can be automatically fixed. You can download and apply these changes in your local project directory of your branch to review the suggestions before committing.1

# Download the patch
curl https://lift.sonatype.com/api/patch/github.com/Borewit/listFix/121.diff -o lift-autofixes.diff

# Apply the patch with git
git apply lift-autofixes.diff

# Review the changes
git diff

Want it all in a single command? Open a terminal in your project's directory and copy and paste the following command:

curl https://lift.sonatype.com/api/patch/github.com/Borewit/listFix/121.diff | git apply

Once you're satisfied, commit and push your changes in your project.

Footnotes

  1. You can preview the patch by opening the patch URL in the browser.

@Borewit
Borewit force-pushed the codeStyle branch 2 times, most recently from 0441691 to d737dac Compare February 27, 2023 22:44
}
}
catch (InterruptedException ex)
catch (InterruptedException ignored)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

33% of developers fix this issue

EmptyCatch: Caught exceptions should not be ignored


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

@Borewit
Borewit merged commit 0df6382 into main Feb 28, 2023
@Borewit
Borewit deleted the codeStyle branch February 28, 2023 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Excluded from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant