debian-mirror-gitlab/.rubocop.yml

184 lines
3.3 KiB
YAML
Raw Normal View History

2018-03-17 18:26:18 +05:30
inherit_gem:
gitlab-styles:
- rubocop-default.yml
2016-08-24 12:49:21 +05:30
inherit_from: .rubocop_todo.yml
2018-12-13 13:39:08 +05:30
require:
- ./rubocop/rubocop
- rubocop-rspec
2016-06-02 11:05:42 +05:30
AllCops:
2019-02-15 15:39:39 +05:30
TargetRailsVersion: 5.0
2016-06-02 11:05:42 +05:30
Exclude:
- 'vendor/**/*'
2017-08-17 22:00:37 +05:30
- 'node_modules/**/*'
- 'db/fixtures/**/*'
2018-11-18 11:00:15 +05:30
- 'db/schema.rb'
- 'ee/db/geo/schema.rb'
2016-06-02 11:05:42 +05:30
- 'tmp/**/*'
- 'bin/**/*'
- 'generator_templates/**/*'
2017-08-17 22:00:37 +05:30
- 'builds/**/*'
2018-03-27 19:54:05 +05:30
- 'plugins/**/*'
2018-03-17 18:26:18 +05:30
CacheRootDirectory: tmp
2016-06-02 11:05:42 +05:30
2018-03-27 19:54:05 +05:30
# This cop checks whether some constant value isn't a
# mutable literal (e.g. array or hash).
Style/MutableConstant:
Enabled: true
Exclude:
- 'db/migrate/**/*'
- 'db/post_migrate/**/*'
- 'ee/db/migrate/**/*'
- 'ee/db/post_migrate/**/*'
- 'ee/db/geo/migrate/**/*'
2018-11-20 20:47:30 +05:30
# TODO: Move this to gitlab-styles
Style/SafeNavigation:
Enabled: false
2018-12-05 23:21:45 +05:30
# Frozen String Literal
Style/FrozenStringLiteralComment:
Enabled: true
Exclude:
- 'config.ru'
- 'Dangerfile'
- 'Gemfile'
- 'Rakefile'
- 'app/views/**/*'
- 'config/**/*'
- 'danger/**/*'
- 'db/**/*'
- 'ee/**/*'
2018-12-13 13:39:08 +05:30
- 'lib/tasks/**/*'
2018-12-05 23:21:45 +05:30
- 'qa/**/*'
- 'rubocop/**/*'
- 'scripts/**/*'
- 'spec/**/*'
2018-12-13 13:39:08 +05:30
RSpec/FilePath:
Exclude:
- 'qa/**/*'
- 'spec/javascripts/fixtures/*'
- 'ee/spec/javascripts/fixtures/*'
- 'spec/requests/api/v3/*'
2018-05-09 12:01:36 +05:30
Naming/FileName:
ExpectMatchingDefinition: true
Exclude:
2018-11-18 11:00:15 +05:30
- 'db/**/*'
- 'ee/db/**/*'
2018-05-09 12:01:36 +05:30
- 'spec/**/*'
- 'features/**/*'
- 'ee/spec/**/*'
- 'qa/spec/**/*'
- 'qa/qa/specs/**/*'
- 'qa/bin/*'
- 'config/**/*'
2018-12-13 13:39:08 +05:30
- 'ee/config/**/*'
2018-05-09 12:01:36 +05:30
- 'lib/generators/**/*'
2018-11-20 20:47:30 +05:30
- 'locale/unfound_translations.rb'
- 'ee/locale/unfound_translations.rb'
2018-05-09 12:01:36 +05:30
- 'ee/lib/generators/**/*'
2018-12-13 13:39:08 +05:30
- 'qa/qa/scenario/test/integration/ldap_no_tls.rb'
- 'qa/qa/scenario/test/integration/ldap_tls.rb'
2018-05-09 12:01:36 +05:30
IgnoreExecutableScripts: true
AllowedAcronyms:
- EE
- JSON
- LDAP
2018-12-13 13:39:08 +05:30
- SAML
2018-05-09 12:01:36 +05:30
- IO
- HMAC
- QA
- ENV
- STL
- PDF
- SVG
- CTE
- DN
- RSA
- CI
- CD
- OAuth
# default ones:
- CLI
- DSL
- ACL
- API
- ASCII
- CPU
- CSS
- DNS
- EOF
- GUID
- HTML
- HTTP
- HTTPS
- ID
- IP
- JSON
- LHS
- QPS
- RAM
- RHS
- RPC
- SLA
- SMTP
- SQL
- SSH
- TCP
- TLS
- TTL
- UDP
- UI
- UID
- UUID
- URI
- URL
- UTF8
- VM
- XML
- XMPP
- XSRF
- XSS
2019-03-02 22:35:43 +05:30
- GRPC
2018-05-09 12:01:36 +05:30
2018-12-05 23:21:45 +05:30
# GitLab ###################################################################
2016-06-02 11:05:42 +05:30
2018-03-17 18:26:18 +05:30
Gitlab/ModuleWithInstanceVariables:
Enable: true
2017-08-17 22:00:37 +05:30
Exclude:
2018-03-17 18:26:18 +05:30
# We ignore Rails helpers right now because it's hard to workaround it
- app/helpers/**/*_helper.rb
- ee/app/helpers/**/*_helper.rb
# We ignore Rails mailers right now because it's hard to workaround it
- app/mailers/emails/**/*.rb
- ee/**/emails/**/*.rb
# We ignore spec helpers because it usually doesn't matter
- spec/support/**/*.rb
- features/steps/**/*.rb
2018-03-26 14:24:53 +05:30
Gitlab/HTTParty:
Enabled: true
2018-03-27 19:54:05 +05:30
GitlabSecurity/PublicSend:
Enabled: true
Exclude:
- 'config/**/*'
- 'db/**/*'
- 'features/**/*'
- 'lib/**/*.rake'
- 'qa/**/*'
- 'spec/**/*'
- 'ee/db/**/*'
- 'ee/lib/**/*.rake'
- 'ee/spec/**/*'
2019-02-15 15:39:39 +05:30
Cop/InjectEnterpriseEditionModule:
Enabled: true
Exclude:
- 'spec/**/*'
- 'ee/spec/**/*'