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
Remove S6480 from default profile #3614
Comments
Yeah, sonarcloud is forcing the react applications to use the |
I'm not sure if this is on your radar as well, but applying useCallback without a |
Adding related Community thread for historic context: |
@ls-yannick thanks for the link. Indeed, For example, when the function is used as a Hook dependency lower in the tree, it will trigger the hook. Anyway, we are good listeners, so we are removing it from the "Sonar Way" until we can learn how to make this more useful for most. Most probably, we will need to improve the rule before it comes back to the spotlight. |
@gabriel-vivas-sonarsource do you know if users of Sonar cloud have something manually to do to disable the rule ? Or the sonar way quality profile will update by itself ? Because we still have the issue on new code in our repo. |
Hi @MaelthiS, it should be automatic if you're using the Sonar Way profile in SonarCloud |
Hey @gabriel-vivas-sonarsource how you doing? This update not reflected for us? Any solution? We using |
Same here btw, it still hasn't come through. |
Same here as well, I still see these errors on my scans |
Sorry for the confusion, we removed from SonarQube LTS before release, it will be updated in SonarCloud soon. |
We still are hassled by it in Sonar Cube. Would be nice with some transparency around the introduction of this rule in the first place. Because when I first noticed this rule, it went against all my instincts with regard to premature optimization versus readable code. What team in Sonar discussed this, and landed in the rule being a clever thing to introduce in the first place? I've already seen applications in havoc with hundreds of "useCallback" statements, in an attempt to oblige this lint rule. The developers feed lambdas to useCalkback, initialize a const with the return value and send this as an property. I wouldn't be surprised if this is more computationally expensive than just sending the lambda in the first place. I know that the code is much less readable. I don't think this rule should be removed from the default, or have a better documentation. I think the rule should be nuked from existence. |
Hi @gabriel-vivas-sonarsource, it seems this rule is still active by default. Any plan to disable it? |
Hello, |
We need to improve documentation before including this rule in LTS
The text was updated successfully, but these errors were encountered: