Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create rule S7119: Global should not depend on possibly not yet initialized variables CPP-5655 #4387

Merged
merged 28 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
babe35d
Create rule S7119
tomasz-kaminski-sonarsource Oct 8, 2024
6af48ec
Added explanation why this is an issue
tomasz-kaminski-sonarsource Oct 8, 2024
0b6938f
Fix - same file and constant init
tomasz-kaminski-sonarsource Oct 8, 2024
a78f754
Bd
tomasz-kaminski-sonarsource Oct 9, 2024
441aff3
Handling static data members
tomasz-kaminski-sonarsource Oct 9, 2024
cb6b683
How to fix it - static funcs
tomasz-kaminski-sonarsource Oct 9, 2024
e03ca17
Merge branch 'master' into rule/add-RSPEC-S7119
tomasz-kaminski-sonarsource Oct 9, 2024
9a9839a
Added inline variable section
tomasz-kaminski-sonarsource Oct 9, 2024
a74d407
Remove trailing spaces
tomasz-kaminski-sonarsource Oct 9, 2024
c18bf60
Grammarly pass
tomasz-kaminski-sonarsource Oct 9, 2024
070df16
Apply suggestions from code review
tomasz-kaminski-sonarsource Oct 10, 2024
942526d
Removed diff and reworked introduction
tomasz-kaminski-sonarsource Oct 10, 2024
ed05a40
Reworked variable instantiated
tomasz-kaminski-sonarsource Oct 10, 2024
27e79c3
Reworked multiple const copies to make it more linked to issue
tomasz-kaminski-sonarsource Oct 10, 2024
8b180b5
Added sections for constinit
tomasz-kaminski-sonarsource Oct 10, 2024
144a040
Merge branch 'master' into rule/add-RSPEC-S7119
tomasz-kaminski-sonarsource Oct 10, 2024
c1f71aa
Grammarly pass
tomasz-kaminski-sonarsource Oct 10, 2024
4237f39
Add links
tomasz-kaminski-sonarsource Oct 10, 2024
f18a99a
Nifty counter inspired
tomasz-kaminski-sonarsource Oct 10, 2024
622caa8
Grammarly pass
tomasz-kaminski-sonarsource Oct 10, 2024
4ae700a
Apply suggestions from code review
tomasz-kaminski-sonarsource Oct 14, 2024
b8cc4a6
Removed accidental unintended change
tomasz-kaminski-sonarsource Oct 14, 2024
32c0178
Used quotes in variable names in code examples
tomasz-kaminski-sonarsource Oct 14, 2024
254e183
Merge branch 'master' into rule/add-RSPEC-S7119
tomasz-kaminski-sonarsource Oct 14, 2024
41789bf
Apply suggestions from code review
tomasz-kaminski-sonarsource Oct 15, 2024
deeea2c
Merge branch 'master' into rule/add-RSPEC-S7119
tomasz-kaminski-sonarsource Oct 15, 2024
7534eec
Fix typo
frederic-tingaud-sonarsource Nov 4, 2024
cb702d2
Merge branch 'master' into rule/add-RSPEC-S7119
frederic-tingaud-sonarsource Nov 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions rules/S7119/cfamily/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"title": "Global should not dependent on possibly not yet initialized variables",
"type": "CODE_SMELL",
"status": "ready",
"remediation": {
"func": "Constant\/Issue",
"constantCost": "30min"
},
"tags": [
"unpredictable"
],
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-7119",
"sqKey": "S7119",
"scope": "All",
"defaultQualityProfiles": ["Sonar way"],
"quickfix": "infeasible",
"code": {
"impacts": {
"MAINTAINABILITY": "HIGH",
"RELIABILITY": "LOW"
},
"attribute": "LOGICAL"
}
}
Loading
Loading