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

Add rules for checks for too many lines. Fixes #63 #64

Merged
merged 1 commit into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions rules/cs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
+csharpsquid:S138|max=20 # Methods with too many lines; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#long-units)
+csharpsquid:S1309 # Violation suppression; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#suppressed-violations)
+csharpsquid:S1541|maximumFunctionComplexityThreshold=10 # Used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#complex-units)
+csharpsquid:S1151 # Switch case clauses should not have too many lines of code. Used by Quality-time
#end please ensure every rule ends with a new line character
5 changes: 5 additions & 0 deletions rules/java.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@
+java:S138|max=20 # Methods with too many lines; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#long-units)
+java:S107|max=5 # Too many parameters; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#many-parameters)
+java:S125 # Used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#commented-out-code)
+java:S104 # Files should not have too many lines of code. Used by Quality-time
+java:S1151 # Switch case clauses should not have too many lines of code. Used by Quality-time
+java:S1188 # Anonymous classes should not have too many lines. Used by Quality-time
+java:S2972 # Inner classes should not have too many lines of code. Used by Quality-time
+java:S5612 # Lambdas should not have too many lines. Used by Quality-time
#end please ensure every rule ends with a new line character
1 change: 1 addition & 0 deletions rules/js.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
+javascript:S109 # Magic numbers; NOT used by Quality-time
+javascript:S138|max=20 # Methods with too many lines; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#long-units)
+javascript:S125 # Used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#commented-out-code)
+javascript:S104 # Files should not have too many lines of code. Used by Quality-time
# Missing: NoSonar, NCSS, Parameters
#end please ensure every rule ends with a new line character
3 changes: 3 additions & 0 deletions rules/kotlin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
+kotlin:S1067 # Expression too complex; NOT used by Quality-time
+kotlin:S138|max=20 # Methods with too many lines; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#long-units)
+kotlin:S107|Max=5 # Too many parameters; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#many-parameters)
+kotlin:S104 # Files should not have too many lines of code. Used by Quality-time
+kotlin:S1151 # When clauses should not have too many lines of code. Used by Quality-time
+kotlin:S5612 # Lambdas should not have too many lines. Used by Quality-time
4 changes: 4 additions & 0 deletions rules/swift.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@
+swift:S138|max=20 # Methods with too many lines; used by Quality-time (https://github.com/ICTU/quality-time/blob/master/docs/METRICS_AND_SOURCES.md#long-units-from-sonarqube)
+swift:S107|functionMax=5 # Too many parameters; used by Quality-time (https://github.com/ICTU/quality-time/blob/master/docs/METRICS_AND_SOURCES.md#many-parameters-from-sonarqube)
+swift:S125 # Used by Quality-time (https://github.com/ICTU/quality-time/blob/master/docs/METRICS_AND_SOURCES.md#commented-out-code-from-sonarqube)
+swift:S104 # Files should not have too many lines of code. Used by Quality-time
+swift:S1151 # Switch case clauses should not have too many lines of code. Used by Quality-time
+swift:S1188 # Closures should not have too many lines. Used by Quality-time
+swift:S2042 # Classes should not have too many lines of code. Used by Quality-time
#end please ensure every rule ends with a new line character
2 changes: 2 additions & 0 deletions rules/vbnet.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
+vbnet:S1067 # Expression too complex; NOT used by Quality-time
+vbnet:S107|max=5 # Too many parameters; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#many-parameters)
+vbnet:S138|max=20 # Methods with too many lines; used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#long-units)
+vbnet:S104 # Files should not have too many lines of code. Used by Quality-time
+vbnet:S1151 # Select Case clauses should not have too many lines of code. Used by Quality-time
# Missing: method length, NoSonar, too many parameters, commented loc
#end please ensure every rule ends with a new line character
1 change: 1 addition & 0 deletions rules/web.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
+Web:ComplexityCheck # NOT used by Quality-time. Rule is deprecated, see https://rules.sonarsource.com/html/RSPEC-1908?search=complexity
+Web:LongJavaScriptCheck # Used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#long-units)
+Web:AvoidCommentedOutCodeCheck # Used by Quality-time (https://quality-time.readthedocs.io/en/latest/reference.html#commented-out-code)
+Web:FileLengthCheck # Files should not have too many lines. Used by Quality-time
#end please ensure every rule ends with a new line character