2022-09-28 11:42:17 +00:00
|
|
|
version: "2" # required to adjust maintainability checks
|
2018-04-23 13:55:21 +00:00
|
|
|
checks:
|
|
|
|
# Methods or functions defined with a high number of arguments
|
|
|
|
argument-count:
|
|
|
|
config:
|
|
|
|
threshold: 6
|
|
|
|
# Boolean logic that may be hard to understand
|
|
|
|
complex-logic:
|
|
|
|
config:
|
|
|
|
threshold: 4
|
|
|
|
# Excessive lines of code within a single file
|
|
|
|
file-lines:
|
|
|
|
config:
|
2024-11-22 16:08:22 +00:00
|
|
|
threshold: 1500
|
2018-04-23 13:55:21 +00:00
|
|
|
# Functions or methods that may be hard to understand. This is disabled as it doesn't appear to be a reliable metric.
|
|
|
|
method-complexity:
|
|
|
|
enabled: false
|
2019-06-26 18:17:41 +00:00
|
|
|
# Classes defined with a high number of functions or methods.
|
2018-04-23 13:55:21 +00:00
|
|
|
method-count:
|
|
|
|
config:
|
2024-11-22 16:08:22 +00:00
|
|
|
threshold: 40
|
2018-04-23 13:55:21 +00:00
|
|
|
# Excessive lines of code within a single function or method
|
|
|
|
method-lines:
|
|
|
|
config:
|
|
|
|
threshold: 500
|
|
|
|
# Deeply nested control structures like if or case
|
|
|
|
nested-control-flow:
|
|
|
|
config:
|
|
|
|
threshold: 4
|
|
|
|
# Functions or methods with a high number of return statements. This is disabled because Go encourages early returns.
|
|
|
|
return-statements:
|
|
|
|
enabled: false
|
|
|
|
# Duplicate code which is not identical but shares the same structure (e.g. variable names may differ). This is disabled due to too many false trips.
|
|
|
|
similar-code:
|
|
|
|
enabled: false
|
|
|
|
# Code that is identical in structure
|
|
|
|
identical-code:
|
|
|
|
config:
|
|
|
|
threshold: # language-specific defaults. an override will affect all languages.
|
|
|
|
exclude_patterns:
|
2021-07-22 17:53:43 +00:00
|
|
|
- "vendor/"
|
|
|
|
- "static/"
|
|
|
|
- "t/"
|
2023-03-01 11:53:17 +00:00
|
|
|
- "images/qr-assets.go"
|