-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy path.codeclimate.yml
159 lines (142 loc) · 4.49 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
156
157
158
159
# CodeClimate Configuration
#
# CodeClimate can run two ways:
# newer, "Engine-based" analysis configuration
# older, "Classic" analysis configuration
################## Engine-Based Configuration ###################
version: "2" # required to adjust maintainability checks
#################### Maintainability Checks #####################
# Almost all checks disabled 2018-02-08; we cannot control checks per file
# The plugins allow control of each rule on a file-by-file basis,
# so we will use only the plugins
checks:
argument-count:
enabled: false
config:
threshold: 4
complex-logic:
enabled: false
config:
threshold: 4
file-lines:
enabled: false
config:
threshold: 250
method-complexity:
enabled: false
config:
threshold: 5
method-count:
enabled: false
config:
threshold: 20
method-lines:
enabled: false
config:
threshold: 25
nested-control-flow:
enabled: false
config:
threshold: 4
return-statements:
enabled: false
config:
threshold: 4
similar-code:
enabled: false
config:
threshold: # language-specific defaults. an override will affect all languages.
identical-code:
enabled: false
config:
threshold: # language-specific defaults. an override will affect all languages.
##### plugins ####
# CodeClimate will run these plugins when CodeClimate is triggered.
# For configuration of specific plugins, see CodeClimate documentation
# for that engine.
plugins:
# check Rails apps for security vulnerabilities
brakeman:
# Use highest available channel https://docs.codeclimate.com/docs/brakeman
# because Github actions linter is broken
# See .github/workflows/ci_rails.yml
# JDC 2023-06-04
channel: brakeman-6-0-1
enabled: true
# helps find security vulnerabilities in Ruby dependencies
bundler-audit:
enabled: true
# report similar code blocks over a configurable mass threshold
duplication:
enabled: true
checks:
# Disable Similar code (temporarily?) due to excessive false positives
Similar code:
enabled: false
config:
languages:
- ruby
- javascript
exclude_patterns:
- app/assets/javascripts/bootstrap.js
- app/assets/javascripts/jquery.js
- app/assets/javascripts/jstz.js
- app/assets/javascripts/lightbox.js
- "db/"
- "log/"
- public/design_test/jquery-1.5.2.min.js
- "tmp/"
- "test/"
# linting, complexity analysis, & style checking for EcmaScript/JavaScript
eslint:
# Disabled (temporarily?). We're currently not doing anything about the
# many hits.
enabled: false
# case-sensitive search for the following strings: TODO, FIXME, HACK, XXX, BUG
# Can be configured to search for any strings
fixme:
enabled: true
checks:
XXX:
# We use "xxx" in numerous places, e.g., theme templates
enabled: false
# markdown style check
markdownlint:
enabled: true
# style and quality checks for Ruby code
# configuration details are in .rubocop.yml files, rather than here.
# WARNING: update "channel" whenever we update RuboCop.
# See docs.codeclimate.com/docs/rubocop#section-using-rubocop-s-newer-versions
rubocop:
enabled: true
# Specify RuboCop version so that we're not stuck with Code Climate's
# default, which can be different than what's in Gemfile.lock. See
# docs.codeclimate.com/docs/rubocop#section-using-rubocop-s-newer-versions
channel: rubocop-1-56-3
# scss style checker
scss-lint:
# Causes an enormous amount of issues
# Therefore, disable it until there's time to start fixing them
enabled: false
#### exclude_patterns ####
# A list of file "patterns" completely excluded from analysis
# Each pattern is either: filenames relative to the project root,
# or shell-style globs relative to the project root.
# Patterns other than named paths starting at root
# must be enclosed in quotes, e.g.: "**.rb", "**/subdir/".
# Patterns can be negated by prefixing them with a !.
# A negated pattern will include the matched files for analysis,
# even if they were excluded by a previous pattern.
exclude_patterns:
- .codeclimate.yml
- app/assets/javascripts/bootstrap.js
- app/assets/javascripts/jquery.js
- app/assets/javascripts/jstz.js
- app/assets/javascripts/lightbox.js
# This file causes a CodeClimate error in the Duplication engine
- app/classes/query/modules/serialization.rb
# Prevent analysis of migrations
- "db/"
- "log/"
- public/design_test/jquery-1.5.2.min.js
- "tmp/"