Skip to content

Commit

Permalink
Add clean code attributes to Delphi rules
Browse files Browse the repository at this point in the history
  • Loading branch information
fourls authored and Cirras committed Sep 15, 2023
1 parent b8c9bb6 commit f2e4e5c
Show file tree
Hide file tree
Showing 120 changed files with 727 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Custom rules plugin API:
- See: [Writing Custom Delphi Rules 101](docs/CUSTOM_RULES_101.md)
- Rule metadata for the new [Clean Code Taxonomy](https://docs.sonarsource.com/sonarqube/10.2/user-guide/clean-code/).
- Support for identifiers prefixed with 2 ampersands (`&&`).
- `OleVariant` overloads for `VarArrayRedim` and `VarClear` intrinsics.
- `InlineAssembly` analysis rule, which flags inline assembly usage.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "5min"
},
"code": {
"attribute": "LOGICAL",
"impacts": {
"RELIABILITY": "HIGH"
}
},
"tags": [],
"defaultSeverity": "Blocker",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "3min"
},
"code": {
"attribute": "CLEAR",
"impacts": {
"MAINTAINABILITY": "MEDIUM"
}
},
"tags": [],
"defaultSeverity": "Major",
"scope": "MAIN",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "5min"
},
"code": {
"attribute": "EFFICIENT",
"impacts": {
"MAINTAINABILITY": "LOW"
}
},
"tags": [],
"defaultSeverity": "Major",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "15min"
},
"code": {
"attribute": "IDENTIFIABLE",
"impacts": {
"MAINTAINABILITY": "LOW"
}
},
"tags": [],
"defaultSeverity": "Minor",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "10min"
},
"code": {
"attribute": "FORMATTED",
"impacts": {
"MAINTAINABILITY": "LOW"
}
},
"tags": [],
"defaultSeverity": "Minor",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "1min"
},
"code": {
"attribute": "CLEAR",
"impacts": {
"MAINTAINABILITY": "LOW"
}
},
"tags": [],
"defaultSeverity": "Minor",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "5min"
},
"code": {
"attribute": "EFFICIENT",
"impacts": {
"MAINTAINABILITY": "MEDIUM"
}
},
"tags": [],
"defaultSeverity": "Major",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
"func": "Constant/Issue",
"constantCost": "15min"
},
"code": {
"attribute": "FOCUSED",
"impacts": {
"MAINTAINABILITY": "MEDIUM",
"RELIABILITY": "MEDIUM"
}
},
"tags": [],
"defaultSeverity": "Critical",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
"func": "Constant/Issue",
"constantCost": "5min"
},
"code": {
"attribute": "LOGICAL",
"impacts": {
"MAINTAINABILITY": "MEDIUM",
"RELIABILITY": "HIGH"
}
},
"tags": [],
"defaultSeverity": "Critical",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "15min"
},
"code": {
"attribute": "IDENTIFIABLE",
"impacts": {
"MAINTAINABILITY": "LOW"
}
},
"tags": [],
"defaultSeverity": "Minor",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "1h"
},
"code": {
"attribute": "MODULAR",
"impacts": {
"MAINTAINABILITY": "MEDIUM"
}
},
"tags": [],
"defaultSeverity": "Major",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "30min"
},
"code": {
"attribute": "FOCUSED",
"impacts": {
"MAINTAINABILITY": "HIGH"
}
},
"tags": [],
"defaultSeverity": "Critical",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "20min"
},
"code": {
"attribute": "CONVENTIONAL",
"impacts": {
"MAINTAINABILITY": "LOW"
}
},
"tags": [],
"defaultSeverity": "Major",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "3min"
},
"code": {
"attribute": "FOCUSED",
"impacts": {
"MAINTAINABILITY": "LOW"
}
},
"tags": [],
"defaultSeverity": "Minor",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
"func": "Constant/Issue",
"constantCost": "30min"
},
"code": {
"attribute": "LOGICAL",
"impacts": {
"MAINTAINABILITY": "LOW",
"RELIABILITY": "MEDIUM"
}
},
"tags": [],
"defaultSeverity": "Critical",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
"func": "Constant/Issue",
"constantCost": "30min"
},
"code": {
"attribute": "LOGICAL",
"impacts": {
"MAINTAINABILITY": "LOW",
"RELIABILITY": "HIGH"
}
},
"tags": [],
"defaultSeverity": "Critical",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "15min"
},
"code": {
"attribute": "IDENTIFIABLE",
"impacts": {
"MAINTAINABILITY": "LOW"
}
},
"tags": [],
"defaultSeverity": "Minor",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "1min"
},
"code": {
"attribute": "IDENTIFIABLE",
"impacts": {
"MAINTAINABILITY": "LOW"
}
},
"tags": [],
"defaultSeverity": "Minor",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "5min"
},
"code": {
"attribute": "COMPLETE",
"impacts": {
"RELIABILITY": "MEDIUM"
}
},
"tags": [],
"defaultSeverity": "Major",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "30min"
},
"code": {
"attribute": "FOCUSED",
"impacts": {
"MAINTAINABILITY": "HIGH"
}
},
"tags": [],
"defaultSeverity": "Critical",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "5min"
},
"code": {
"attribute": "LOGICAL",
"impacts": {
"RELIABILITY": "MEDIUM"
}
},
"tags": [],
"defaultSeverity": "Major",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "1min"
},
"code": {
"attribute": "LOGICAL",
"impacts": {
"RELIABILITY": "HIGH"
}
},
"tags": [],
"defaultSeverity": "Major",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "30min"
},
"code": {
"attribute": "COMPLETE",
"impacts": {
"RELIABILITY": "MEDIUM"
}
},
"tags": [],
"defaultSeverity": "Major",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "1min"
},
"code": {
"attribute": "FORMATTED",
"impacts": {
"MAINTAINABILITY": "LOW"
}
},
"tags": [],
"defaultSeverity": "Minor",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "5min"
},
"code": {
"attribute": "DISTINCT",
"impacts": {
"MAINTAINABILITY": "LOW"
}
},
"tags": [],
"defaultSeverity": "Minor",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "1min"
},
"code": {
"attribute": "DISTINCT",
"impacts": {
"MAINTAINABILITY": "LOW"
}
},
"tags": [],
"defaultSeverity": "Minor",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "5min"
},
"code": {
"attribute": "DISTINCT",
"impacts": {
"MAINTAINABILITY": "LOW"
}
},
"tags": [],
"defaultSeverity": "Minor",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
"func": "Constant/Issue",
"constantCost": "5min"
},
"code": {
"attribute": "CLEAR",
"impacts": {
"MAINTAINABILITY": "MEDIUM",
"RELIABILITY": "LOW"
}
},
"tags": [],
"defaultSeverity": "Critical",
"scope": "ALL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"func": "Constant/Issue",
"constantCost": "20min"
},
"code": {
"attribute": "DISTINCT",
"impacts": {
"MAINTAINABILITY": "LOW"
}
},
"tags": [],
"defaultSeverity": "Major",
"scope": "ALL",
Expand Down
Loading

0 comments on commit f2e4e5c

Please sign in to comment.