diff --git a/rules/S8230/cfamily/metadata.json b/rules/S8230/cfamily/metadata.json new file mode 100644 index 00000000000..ada735a4a23 --- /dev/null +++ b/rules/S8230/cfamily/metadata.json @@ -0,0 +1,24 @@ +{ + "title": "MSVC-specific extensions should not be used", + "type": "CODE_SMELL", + "status": "ready", + "remediation": { + "func": "Constant\/Issue", + "constantCost": "5min" + }, + "tags": [ + "lock-in" + ], + "defaultSeverity": "Minor", + "ruleSpecification": "RSPEC-8230", + "sqKey": "S8230", + "scope": "All", + "defaultQualityProfiles": [], + "quickfix": "infeasible", + "code": { + "impacts": { + "MAINTAINABILITY": "LOW" + }, + "attribute": "CONVENTIONAL" + } +} diff --git a/rules/S8230/cfamily/rule.adoc b/rules/S8230/cfamily/rule.adoc new file mode 100644 index 00000000000..dfa109273fe --- /dev/null +++ b/rules/S8230/cfamily/rule.adoc @@ -0,0 +1,23 @@ +MSVC-specific extensions should not be used + +== Why is this an issue? + +Proprietary compiler extensions can be handy, but they commit you to always using that compiler. This rule raises an issue when MSVC-specific extensions are used. Other compilers will reject such code, making it non-portable. Keeping code standard-conforming ensures consistency across different compilers and platforms. + +== How to fix it + +Replace MSVC-specific extensions with standard-conforming alternatives. + +//=== Code examples +// +//Code examples will be added here. + +== Resources + +=== Related rules + +* S8216 - Code should not rely on features beyond the configured {cpp} standard +* S3715 - GNU extensions should not be used +* S8231 - Non-standard attributes should not be used +* S4263 reports uses of MSVC-specific include file search strategy +* S2260 tracks parsing failures and can help identify compiler-specific extensions that the analyzer fails to recognize diff --git a/rules/S8230/metadata.json b/rules/S8230/metadata.json new file mode 100644 index 00000000000..2c63c085104 --- /dev/null +++ b/rules/S8230/metadata.json @@ -0,0 +1,2 @@ +{ +}