Modify S109 for JS: document exclusions (#3380)
## Review A dedicated reviewer checked the rule description successfully for: - [ ] logical errors and incorrect information - [ ] information gaps and missing content - [ ] text style and tone - [ ] PR summary and labels follow [the guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule) --------- Co-authored-by: Ilia Kebets <104737176+ilia-kebets-sonarsource@users.noreply.github.com>
This commit is contained in:
parent
c02de84bd5
commit
7e46053974
@ -1,5 +1,14 @@
|
||||
include::../description.adoc[]
|
||||
|
||||
=== Exceptions
|
||||
|
||||
- the following numbers used in arithmetic operations: -1, 0, 1, as well as powers of 2 and 10
|
||||
- time-related constants such as 24 and 60 are excluded
|
||||
- numbers used in JSX elements are excluded
|
||||
- enum values, default values, and other assignments are excluded
|
||||
- arguments to `parseInt()` and `JSON.stringify()` are excluded
|
||||
- numbers used in bitwise operations are excluded
|
||||
|
||||
include::../how-to-fix-it.adoc[]
|
||||
|
||||
=== Code examples
|
||||
@ -27,6 +36,8 @@ function doSomething() {
|
||||
}
|
||||
----
|
||||
|
||||
|
||||
|
||||
ifdef::env-github,rspecator-view[]
|
||||
|
||||
'''
|
||||
|
Loading…
x
Reference in New Issue
Block a user