-
Notifications
You must be signed in to change notification settings - Fork 30
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
Create rule S7119: Global should not depend on possibly not yet initialized variables CPP-5655 #4387
Changes from 20 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
babe35d
Create rule S7119
tomasz-kaminski-sonarsource 6af48ec
Added explanation why this is an issue
tomasz-kaminski-sonarsource 0b6938f
Fix - same file and constant init
tomasz-kaminski-sonarsource a78f754
Bd
tomasz-kaminski-sonarsource 441aff3
Handling static data members
tomasz-kaminski-sonarsource cb6b683
How to fix it - static funcs
tomasz-kaminski-sonarsource e03ca17
Merge branch 'master' into rule/add-RSPEC-S7119
tomasz-kaminski-sonarsource 9a9839a
Added inline variable section
tomasz-kaminski-sonarsource a74d407
Remove trailing spaces
tomasz-kaminski-sonarsource c18bf60
Grammarly pass
tomasz-kaminski-sonarsource 070df16
Apply suggestions from code review
tomasz-kaminski-sonarsource 942526d
Removed diff and reworked introduction
tomasz-kaminski-sonarsource ed05a40
Reworked variable instantiated
tomasz-kaminski-sonarsource 27e79c3
Reworked multiple const copies to make it more linked to issue
tomasz-kaminski-sonarsource 8b180b5
Added sections for constinit
tomasz-kaminski-sonarsource 144a040
Merge branch 'master' into rule/add-RSPEC-S7119
tomasz-kaminski-sonarsource c1f71aa
Grammarly pass
tomasz-kaminski-sonarsource 4237f39
Add links
tomasz-kaminski-sonarsource f18a99a
Nifty counter inspired
tomasz-kaminski-sonarsource 622caa8
Grammarly pass
tomasz-kaminski-sonarsource 4ae700a
Apply suggestions from code review
tomasz-kaminski-sonarsource b8cc4a6
Removed accidental unintended change
tomasz-kaminski-sonarsource 32c0178
Used quotes in variable names in code examples
tomasz-kaminski-sonarsource 254e183
Merge branch 'master' into rule/add-RSPEC-S7119
tomasz-kaminski-sonarsource 41789bf
Apply suggestions from code review
tomasz-kaminski-sonarsource deeea2c
Merge branch 'master' into rule/add-RSPEC-S7119
tomasz-kaminski-sonarsource 7534eec
Fix typo
frederic-tingaud-sonarsource cb702d2
Merge branch 'master' into rule/add-RSPEC-S7119
frederic-tingaud-sonarsource File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"title": "Global should not depend on possibly not yet initialized variables", | ||
tomasz-kaminski-sonarsource marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"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" | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you change that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By pure accident, I will fix that. Thank you for caching it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed