-
Notifications
You must be signed in to change notification settings - Fork 143
/
Copy path.rubocop.yml
109 lines (97 loc) · 3.3 KB
/
.rubocop.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
inherit_gem:
gitlab-styles:
- rubocop-default.yml
inherit_from: .rubocop_todo.yml
require:
- ./lib/rubocop/rubocop
- rubocop-rspec
AllCops:
TargetRubyVersion: 2.7
# Cop names are displayed in offense messages by default. Change behavior
# by overriding DisplayCopNames, or by giving the `--no-display-cop-names`
# option.
DisplayCopNames: true
# Style guide URLs are not displayed in offense messages by default. Change
# behavior by overriding DisplayStyleGuide, or by giving the
# -S/--display-style-guide option.
DisplayStyleGuide: false
# New cops introduced between major versions are set to a special pending status
# and are not enabled by default with warning message.
# Change this behavior by overriding either `NewCops: enable` or `NewCops: disable`.
# When `NewCops` is `enable`, pending cops are enabled in bulk. Can be overridden by
# the `--enable-pending-cops` command-line option.
# When `NewCops` is `disable`, pending cops are disabled in bulk. Can be overridden by
# the `--disable-pending-cops` command-line option.
NewCops: disable
# Determines if a notification for extension libraries should be shown when
# rubocop is run. Keys are the name of the extension, and values are an array
# of gems in the Gemfile that the extension is suggested for, if not already
# included.
SuggestExtensions: false
# Exclude some GitLab files
Exclude:
- 'bin/*'
- 'gems/**/*'
- '.bundle/**/*'
- 'cache/**/*'
- 'node_modules/**/*'
- 'vendor/bundle/**/*'
- 'files/gitlab-cookbooks/runit/**/*'
- 'scripts/changelog'
- 'danger/changelog/Dangerfile'
- 'scripts/security-harness'
# No rails in omnibus
Rails:
Enabled: false
# TODO re-enable and start updating rspec tests
RSpec:
Enabled: false
# We use git repos in our gemfile, but only our own repos
# TODO: Update the cop to allow us to enable it and whitelist our groups
Cop/GemFetcher:
Enabled: false
# We are not concerned with the security of using public in omnibus but we want to ensure
# Any webserver script we might ship in the future is tested for it
GitlabSecurity/PublicSend:
Enabled: true
Exclude:
- 'files/gitlab-cookbooks/package/**/*'
- 'files/gitlab-ctl-commands/**/*'
- 'files/gitlab-ctl-commands-ee/**/*'
- 'spec/**/*'
# This is only useful for our build scripts, used in CI
# Exlude most other locations
Cop/AvoidUsingEnv:
Enabled: true
Exclude:
- omnibus.rb
- files/**/*
- docker/**/*
- lib/gitlab/util.rb
- spec/lib/gitlab/util_spec.rb
Cop/SpecifyDefaultVersion:
Enabled: true
Include:
- config/software/*.rb
Exclude:
# These files either use `path` source and doesn't need a default_version
# or is just a wrapper around other definitions
- config/software/gitlab-config-template.rb
- config/software/gitlab-cookbooks.rb
- config/software/gitlab-ctl-ee.rb
- config/software/gitlab-ctl.rb
- config/software/gitlab-scripts.rb
- config/software/gitlab-selinux.rb
- config/software/openssl.rb
Style/MultilineIfModifier:
Enabled: false
Lint/HashCompareByIdentity: # (new in 0.93)
Enabled: true
Lint/RedundantSafeNavigation: # (new in 0.93)
Enabled: true
Style/ClassEqualityComparison: # (new in 0.93)
Enabled: true
Style/RedundantFileExtensionInRequire:
Enabled: true
Exclude:
- files/**/*