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

Sonar: This block of commented-out lines of code should be removed #26268

Merged
merged 3 commits into from
May 25, 2024

Conversation

qmonmert
Copy link
Contributor

@qmonmert qmonmert commented May 25, 2024

Should remove a lot of Sonar code smells like https://sonarcloud.io/project/issues?impactSoftwareQualities=MAINTAINABILITY&resolved=false&id=jhipster-sample-application&open=AY92SBeNzvwT9Xfig0tw

Related to #25231


Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (below reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@qmonmert qmonmert marked this pull request as ready for review May 25, 2024 17:03
@qmonmert qmonmert requested review from DanielFran and mshima May 25, 2024 17:03
Comment on lines 43 to 44
*/
@SuppressWarnings("java:S125")
Copy link
Member

Choose a reason for hiding this comment

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

I think we should remove the commented code.
I think we can do something like:

Suggested change
*/
@SuppressWarnings("java:S125")
*
* @see <a href="https://github.com/jhipster/generator-jhipster/tree/v<%- jhipsterVersion %>/generators/gatling#logging-tips">Logging tips</a>
*/

Add a README.md in https://github.com/jhipster/generator-jhipster/tree/main/generators/gatling with:

## Logging tips

```
LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
{
    // Log all HTTP requests
    //context.getLogger("io.gatling.http").setLevel(Level.valueOf("TRACE"));
    // Log failed HTTP requests
    //context.getLogger("io.gatling.http").setLevel(Level.valueOf("DEBUG"));
}
```

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mshima ok let's try this

@mshima mshima requested a review from mraible May 25, 2024 20:36
mraible
mraible previously approved these changes May 25, 2024
@DanielFran DanielFran merged commit e5c605e into jhipster:main May 25, 2024
52 checks passed
@mraible mraible added this to the 8.5.0 milestone May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants