From 6158632a632cdb2866f23cc52e060e02b90e96a1 Mon Sep 17 00:00:00 2001 From: guillaume-dequenne-sonarsource Date: Thu, 30 Jan 2025 10:23:48 +0000 Subject: [PATCH] Create rule S7193 --- rules/S7193/metadata.json | 2 ++ rules/S7193/python/metadata.json | 25 ++++++++++++++++++ rules/S7193/python/rule.adoc | 44 ++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 rules/S7193/metadata.json create mode 100644 rules/S7193/python/metadata.json create mode 100644 rules/S7193/python/rule.adoc diff --git a/rules/S7193/metadata.json b/rules/S7193/metadata.json new file mode 100644 index 00000000000..2c63c085104 --- /dev/null +++ b/rules/S7193/metadata.json @@ -0,0 +1,2 @@ +{ +} diff --git a/rules/S7193/python/metadata.json b/rules/S7193/python/metadata.json new file mode 100644 index 00000000000..76261b0a522 --- /dev/null +++ b/rules/S7193/python/metadata.json @@ -0,0 +1,25 @@ +{ + "title": "FIXME", + "type": "CODE_SMELL", + "status": "ready", + "remediation": { + "func": "Constant\/Issue", + "constantCost": "5min" + }, + "tags": [ + ], + "defaultSeverity": "Major", + "ruleSpecification": "RSPEC-7193", + "sqKey": "S7193", + "scope": "All", + "defaultQualityProfiles": ["Sonar way"], + "quickfix": "unknown", + "code": { + "impacts": { + "MAINTAINABILITY": "HIGH", + "RELIABILITY": "MEDIUM", + "SECURITY": "LOW" + }, + "attribute": "CONVENTIONAL" + } +} diff --git a/rules/S7193/python/rule.adoc b/rules/S7193/python/rule.adoc new file mode 100644 index 00000000000..caae0d69054 --- /dev/null +++ b/rules/S7193/python/rule.adoc @@ -0,0 +1,44 @@ +FIXME: add a description + +// If you want to factorize the description uncomment the following line and create the file. +//include::../description.adoc[] + +== Why is this an issue? + +FIXME: remove the unused optional headers (that are commented out) + +//=== What is the potential impact? + +== How to fix it +//== How to fix it in FRAMEWORK NAME + +=== Code examples + +==== Noncompliant code example + +[source,python,diff-id=1,diff-type=noncompliant] +---- +FIXME +---- + +==== Compliant solution + +[source,python,diff-id=1,diff-type=compliant] +---- +FIXME +---- + +//=== How does this work? + +//=== Pitfalls + +//=== Going the extra mile + + +//== Resources +//=== Documentation +//=== Articles & blog posts +//=== Conference presentations +//=== Standards +//=== External coding guidelines +//=== Benchmarks