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

SONARJAVA-5291 Create rule S7177: @DirtiesContext should be properly configured #4610

Merged
merged 9 commits into from
Jan 27, 2025
Next Next commit
Create rule S7177
leonardo-pilastri-sonarsource committed Jan 24, 2025
commit 0aa2a9df5e6a8742c81e06f5f34958ba25d42ec1
25 changes: 25 additions & 0 deletions rules/S7177/java/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"title": "FIXME",
"type": "CODE_SMELL",
"status": "ready",
"remediation": {
"func": "Constant\/Issue",
"constantCost": "5min"
},
"tags": [
],
"defaultSeverity": "Major",
"ruleSpecification": "RSPEC-7177",
"sqKey": "S7177",
"scope": "All",
"defaultQualityProfiles": ["Sonar way"],
"quickfix": "unknown",
"code": {
"impacts": {
"MAINTAINABILITY": "HIGH",
"RELIABILITY": "MEDIUM",
"SECURITY": "LOW"
},
"attribute": "CONVENTIONAL"
}
}
44 changes: 44 additions & 0 deletions rules/S7177/java/rule.adoc
Original file line number Diff line number Diff line change
@@ -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,java,diff-id=1,diff-type=noncompliant]
----
FIXME
----

==== Compliant solution

[source,java,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
2 changes: 2 additions & 0 deletions rules/S7177/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}