* CPP-6162 S1265 Require sized delete since C++14 and definitions in the same file
* Remove requirement to be in the same file
---------
Co-authored-by: Mostafa Mohammed <mostafa.mohammed@sonarsource.com>
* Modify rule S6945: Add MAINTAINABILITY quality.
S6945 does not necessarily indicate a bug since COND might not be set on
purpose.
Hence, keeping the type as `CODE_SMELL` appears correct.
However, as a code smell, we need to qualify its `MAINTAINABILITY` impact.
At the same time, we keep the existing `RELIABILITY` impact:
Not setting COND is a practice that not only leads to harder to debug code but
it may also lead to bugs
* Modify rule S6945: Upgrade severity and impact to Critical and HIGH
Following the documentation, MAINTAINABILITY issues should have at least HIGH
impact, and Critical severity, if they can lead to the introduction of bugs.
RELIABILITY issues should have at least HIGH impact, and Critical severity,
if they can for example cause corrupted data.
Both applies here. Hence, we upgrade the `defaultSeverity` and impact
levels.
These are the documentation link:
https://docs.sonarsource.com/sonarqube-server/2025.1/extension-guide/adding-coding-rules/#setting-severities-in-mqr-modehttps://docs.sonarsource.com/sonarqube-server/2025.1/extension-guide/adding-coding-rules/#setting-severities-in-se-mode
S6977 definitely impacts RELIABILITY, but it was typed as a
`CODE_SMELL`.
However, if reliability is the main quality of an issue, then it should
be paired with the `BUG` type.
S6977 is not a BUG in the sense that correctness is affected.
At the same time, the previous MAINTAINABILITY quality is not impacted at all.
Also, the issue does negatively affect performance, so it is bug in that sense.
Thus, the decision was made to change the type to `BUG`.
See also
https://sonarsource.slack.com/archives/C026N4DMXNK/p1740474666962219?thread_ts=1740420785.011249&cid=C026N4DMXNK
for an internal discussion.
* Create rule S7187: PySpark Pandas DataFrame columns should not use a
reserved name
---------
Co-authored-by: joke1196 <joke1196@users.noreply.github.com>
Co-authored-by: David Kunzmann <david.kunzmann@sonarsource.com>
* Create rule S7196: Complex logic provided to PySpark withColumn method should be refactored into a separate expression
---------
Co-authored-by: thomas-serre-sonarsource <thomas-serre-sonarsource@users.noreply.github.com>
Co-authored-by: Thomas Serre <thomas.serre@sonarsource.com>
* Create Rule S7182: The `subset` argument should be provided when using PySpark DataFrame `dropDuplicates`
---------
Co-authored-by: joke1196 <joke1196@users.noreply.github.com>
Co-authored-by: David Kunzmann <david.kunzmann@sonarsource.com>
* Create rule S7191
* Create rule S7191: PySpark should be preferred over when multiple columns are specified
* Fix after review
---------
Co-authored-by: thomas-serre-sonarsource <thomas-serre-sonarsource@users.noreply.github.com>
Co-authored-by: Thomas Serre <thomas.serre@sonarsource.com>
Co-authored-by: Guillaume Dequenne <guillaume.dequenne@sonarsource.com>
* SONARPY-2489 Create rule S7189 PySpark DataFrames used multiple times should be cached or persisted
* Fix after review
* Add information on when the rule actually triggers
---------
Co-authored-by: guillaume-dequenne-sonarsource <guillaume-dequenne-sonarsource@users.noreply.github.com>
Co-authored-by: Guillaume Dequenne <guillaume.dequenne@sonarsource.com>
* Add go to rule S6437
* Add description for S6437 for Go
---------
Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
`description.adoc` is using `detections` and not `detectons` as a variable:
```
This rule detects {detections} having a name matching a list of words (secret, token, credential, auth, api[_.-]?key) being assigned a pseudorandom hard-coded value.
```
This PR makes the value rendered correctly on https://sonarsource.github.io/rspec/#/rspec/S6418/php