Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@renaud-tognelli-sonarsource
Copy link
Contributor

@renaud-tognelli-sonarsource renaud-tognelli-sonarsource commented May 20, 2025

@renaud-tognelli-sonarsource renaud-tognelli-sonarsource force-pushed the renaud/js-analysis-consumer-can-be-disabled branch 3 times, most recently from e2ec2a7 to a623b8a Compare May 22, 2025 13:08
@renaud-tognelli-sonarsource renaud-tognelli-sonarsource force-pushed the renaud/js-analysis-consumer-can-be-disabled branch from edc2fe2 to 09a35f7 Compare May 22, 2025 13:52
@renaud-tognelli-sonarsource renaud-tognelli-sonarsource marked this pull request as ready for review May 22, 2025 14:09
Copy link
Contributor

@vdiez vdiez left a comment

Choose a reason for hiding this comment

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

LGTM!!

this.consumers = List.copyOf(consumers);
LOG.debug("Registered JsAnalysisConsumers {}", this.consumers);
this.consumers = consumers.stream().filter(JsAnalysisConsumer::isEnabled).toList();
if (LOG.isDebugEnabled()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why the need for this check? if log level is higher it will just not be logged, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

indeed, it's a not needed optimisation, as computing the value is not expensive here, I will remove it for simplicity.

Copy link
Contributor

Choose a reason for hiding this comment

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

that's ok, no need to remove. I just wanted to make sure

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To late 😄
I think it is more readable without,
the code is called once per analsysis,
less is more 👍

I also added some comments on the deprecated properties.

@sonarqube-next
Copy link

@renaud-tognelli-sonarsource renaud-tognelli-sonarsource merged commit ebf23a3 into master May 23, 2025
26 checks passed
@renaud-tognelli-sonarsource renaud-tognelli-sonarsource deleted the renaud/js-analysis-consumer-can-be-disabled branch May 23, 2025 09:24
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.

2 participants