forked from aurelia/aurelia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.codeclimate.yml
76 lines (76 loc) · 2.36 KB
/
.codeclimate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
version: "2" #required to adjust maintainability checks
checks:
# Argument count
# Methods or functions defined with a high number of arguments
argument-count:
enabled: true
config:
treshold: 4 # default 4
# Complex logic
# Boolean logic that may be hard to understand
complex-logic:
enabled: true
config:
treshold: 4 # default 4
# File length
# Excessive lines of code within a single file
file-lines:
enabled: true
config:
treshold: 250 # default 250
# Identical blocks of code
# Duplicate code which is syntactically identical (but may be formatted differently)
identical-code:
enabled: true
# Method complexity (= cognitive complexity)
# Functions or methods that may be hard to understand
method-complexity:
enabled: true
config:
treshold: 15 # default 5
# Method count
# Classes defined with a high number of functions or methods
method-count:
enabled: true
config:
treshold: 20 # default 20
# Method length
# Excessive lines of code within a single function or method
method-lines:
enabled: true
config:
treshold: 25 # default 25
# Nested control flow
# Deeply nested control structures like if or case
nested-control-flow:
enabled: true
config:
treshold: 4 # default 4
# Return statements
# Functions or methods with a high number of return statements
return-statements:
enabled: true
config:
treshold: 4 # default 4
# Similar blocks of code
# Duplicate code which is not identical but shares the same structure (e.g. variable names may differ)
similar-code:
enabled: false # default true
plugins:
tslint:
enabled: false
exclude_patterns:
# Exclude code that is not actually built and published
# The reasoning being that dev code like tests or build scripts can be changed without having to account for backwards compatibility and thus is much easier to refactor / tidy up at a later point in time
- ".circleci/"
- ".vscode/"
- "docs/"
- "**/node_modules/"
- "**/dist/"
- "**/coverage/"
- "**/test/"
- "**/examples/"
- "/scripts/"
# The array-observer is complex because it closely follows the (well-documented) ES spec and uses a quickSort algorithm based on the well-known V8 engine.
# This logic is thoroughly tested and will likely never need to change, thus shouldn't be considered a maintenance burden.
- "packages/runtime/src/binding/array-observer.ts"