In some cases, the `rule.adoc` at root of a rule is never included
anywhere and thus is dead code.
It's a maintenance cost by itself, but also it misses opportunities to
inline code that seems used by two documents when in fact only one
document is actually rendered. And this missed opportunity, in turn,
stops us from applying the correct language tag on the code samples.
This is an automatic update of the package + a fix for a type error that
is detected with the newer typescript compiler.
I did this hoping to address the Dependabot concerns, but the update
didn't go far enough.
The type fix changes the type or error in `useFetch` from "unknown" to a
boolean (has error / no error), which is how we use it as far as I can
tell.
The Geeksforgeeks article promotes the C-style casts without any note on
its dangerousness. The C++ alternative are presented as an adoc thing,
missing the point again.
Provide consistent examples for CFamily, CSharp, and Java.
Make JS, PHP, Apex, Go, Kotlin, and Scala consistent.
Python has its own syntax so inline relevant bits.
Other languages are not updated: their description is considered good
enough and it would require a significant investment to not mess up the
syntax in their examples.
The languages for this rule fall into two categories:
* CFamily, JS, and PLSQL: "Variables should not be shadowed" (general
case of shadowing)
* C#, Flex, Java, PHP, Swift: "Local variables should not shadow
field/property/enum case/..." (narrow case of shadowing)
For CFamily, these tickets are also handled: CPP-2785 CPP-3589
## Review
A dedicated reviewer checked the rule description successfully for:
- [x] logical errors and incorrect information
- [x] information gaps and missing content
- [x] text style and tone
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
## 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: Zsolt Kolbay <121798625+zsolt-kolbay-sonarsource@users.noreply.github.com>