-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.codeclimate.yml
155 lines (155 loc) · 5.4 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
version: "2"
checks:
argument-count:
enabled: true
config:
threshold: 5
complex-logic:
enabled: true
config:
threshold: 4
file-lines:
enabled: true
config:
threshold: 1000
method-complexity:
enabled: true
config:
threshold: 50 # Only check extreme cases
method-count: # Done in PHPMD
enabled: false
config:
threshold: 20
method-lines: # Done in PHPMD
enabled: false
config:
threshold: 100
nested-control-flow:
enabled: true
config:
threshold: 4
return-statements:
enabled: true
config:
threshold: 4
similar-code:
enabled: false
config:
threshold: #language-specific defaults. overrides affect all languages.
identical-code:
enabled: true
config:
threshold: #language-specific defaults. overrides affect all languages.
plugins:
fixme:
enabled: true
csslint:
enabled: true
config:
config: tests/.csslintrc
checks:
adjoining-classes:
enabled: false
box-model:
enabled: false
# Disable: "The box-sizing property isn't supported in IE6 and IE7". I don't care for IE6 and IE7.
box-sizing:
enabled: false
ids:
enabled: false
# Disable: I need this for WP admin bar overwrites in some cases.
important:
enabled: false
order-alphabetical:
enabled: false
unqualified-attributes:
enabled: false
# Disable: "The universal selector (*) is known to be slow". This is only for ancient browsers..
universal-selector:
enabled: false
eslint:
enabled: true
config:
config: tests/.eslintrc
phpmd:
enabled: true
config:
rulesets: "tests/phpmd.xml"
phpcodesniffer:
enabled: true
config:
standard: "Wordpress-Extra"
checks:
# Disable: Class file names should be based on the class name with "class-" prepended.
WordPress Files FileName InvalidClassFileName:
enabled: false
# Disable: When an array uses associative keys, each value should start on a new line.
WordPress Arrays ArrayDeclarationSpacing AssociativeKeyFound:
enabled: false
# Disable: Member variable "" is not in valid snake_case format
WordPress NamingConventions ValidVariableName MemberNotSnakeCase:
enabled: false
# Disable: Object property "" is not in valid snake_case format
WordPress NamingConventions ValidVariableName NotSnakeCaseMemberVar:
enabled: false
# Disable: Method name "" in class "" is not in snake case format, try ""
WordPress NamingConventions ValidFunctionName MethodNameInvalid:
enabled: false
# Disable: Opening brace should be on the same line as the declaration for class
WordPress Classes ClassOpeningStatement BraceOnNewLine:
enabled: false
# Disable: Overriding WordPress globals is prohibited
WordPress Variables GlobalVariables OverrideProhibited:
enabled: false
# Disable: Expected # space before "!"; # found
WordPress WhiteSpace OperatorSpacing SpacingBefore:
enabled: false
# Disable: Blank line found after control structure
WordPress WhiteSpace ControlStructureSpacing BlankLineAfterEnd:
enabled: false
# Disable: The $domain arg should be single a string literal, not "".
WordPress WP I18n NonSingularStringLiteralDomain:
enabled: false
# Disable: Expected next thing to be an escaping function (see Codex for 'Data Validation'), not ''
WordPress XSS EscapeOutput OutputNotEscaped:
enabled: false
# Disable: The use of function "" is discouraged
WordPress PHP DiscouragedFunctions Discouraged:
enabled: false
# Disable: Expected # spaces after parameter type; # found
Squiz Commenting FunctionComment SpacingAfterParamType:
enabled: false
# Disable: Code after EXIT statement cannot be executed (This test doesn't work correctly)
Squiz PHP NonExecutableCode Unreachable:
enabled: false
# Disable: This comment is #% valid code; is this commented out code?
Squiz PHP CommentedOutCode Found:
enabled: false
# Disable: String "" does not require double quotes; use single quotes instead
Squiz Strings DoubleQuoteUsage NotRequired:
enabled: false
# Disable: Expected 1 space after closing brace; newline found
Squiz ControlStructures ControlSignature SpaceAfterCloseBrace:
enabled: false
# Disable: Opening brace should be on the same line as the declaration for class
Generic Classes OpeningBraceSameLine BraceOnNewLine:
enabled: false
# Disable: There must be exactly one blank line before the tags in a doc comment
Generic Commenting DocComment SpacingBeforeTags:
enabled: false
# Disable: Inline control structures are not allowed
Generic ControlStructures InlineControlStructure NotAllowed:
enabled: false
# Disable: Tabs must be used to indent lines; spaces are not allowed (not working as I want it to)
Generic WhiteSpace DisallowSpaceIndent SpacesUsed:
enabled: false
# Disable: Line indented incorrectly; expected at least # tabs, found #
Generic WhiteSpace ScopeIndent Incorrect:
enabled: false
Generic WhiteSpace ScopeIndent IncorrectExact:
enabled: false
exclude_patterns:
- "tests/*"
- "bin/*"
# Local
- "vendor/*"