[WEB][DRAFT][25 meters] Create EcoCode tag for existing sonar performance rules
Adouni opened this issue · 1 comments
Adouni commented
Create EcoCode tag for existing sonar performance rules
Platform
OS | OS version | Langage |
---|---|---|
- | - | - |
Main caracteristics
ID | Title | Category | Sub-category |
---|---|---|---|
xxx | Create EcoCode tag for existing sonar performance rules | Best Practice | - |
Severity / Remediation Cost
Severity | Remediation Cost |
---|---|
Minor | Minor |
Rule short description
Create a catalog of sonar rules related to performance
Rule complete description
Text
Depending on the language, several sonar rules impact code performance.
For example
- Java
"wait(...)" should be used instead of "Thread.sleep(...)" when a lock is held
https://rules.sonarsource.com/java/tag/performance/RSPEC-2276 - JavaScript
No uniq values as keys for JSX list components
https://rules.sonarsource.com/typescript/tag/performance/RSPEC-6486 - HTML
Dynamic includes should not be used
https://rules.sonarsource.com/html/tag/performance/RSPEC-1937
HTML
---
Implementation principle
---
jhertout commented
- Java "wait(...)" should be used instead of "Thread.sleep(...)" when a lock is held https://rules.sonarsource.com/java/tag/performance/RSPEC-2276 -> for me it is not an eco-design smell
- JavaScript No uniq values as keys for JSX list components
https://rules.sonarsource.com/typescript/tag/performance/RSPEC-6486 -> seems ok to me if we read the description. May be a good rule to test measure I think and see the energy impact. - HTML Dynamic includes should not be used
https://rules.sonarsource.com/html/tag/performance/RSPEC-1937 -> seems ok to me if we read the description. May be a good rule to test measure I think and see the energy impact.
If the second reviewer is OK, maybe we should close this issue and create one for each rule to tag.