-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.rubocop.yml
92 lines (85 loc) · 2.85 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
inherit_from:
- .rubocop_rspec.yml
##
# Standard based Rubocop config.
# - https://github.com/testdouble/standard
# - https://github.com/testdouble/standard#usage-via-rubocop
# - https://evilmartians.com/chronicles/rubocoping-with-legacy-bring-your-ruby-code-up-to-standard
#
require:
##
# Rubocop for RSpec files.
# - https://github.com/rubocop/rubocop-rspec
#
- rubocop-rspec
##
# Rubocop cops for common performance issues.
# - https://github.com/rubocop/rubocop-performance
#
# NOTE: `rubocop-performance` is automatically bundled with Standard.
# - https://github.com/standardrb/standard
#
- rubocop-performance
##
# RuboCop cops that detect the use of magic numbers.
# - https://github.com/meetcleo/rubocop-magic_numbers
#
# TODO: Leave explanation to every `MagicNumbers` cops complaints.
# NOTE: Do NOT forget to uncomment `MagicNumbers` custom configs.
# - rubocop-magic_numbers
##
# RuboCop cops that enforce Ruby gem packaging best practices.
# - https://github.com/utkarsh2102/rubocop-packaging
#
- rubocop-packaging
##
# Rubocop cops for common thread safety issues.
# - https://github.com/covermymeds/rubocop-thread_safety
#
# TODO: Leave explanation to every `ThreadSafety/InstanceVariableInClassMethod`.
# - https://github.com/covermymeds/rubocop-thread_safety/blob/master/spec/rubocop/cop/thread_safety/instance_variable_in_class_method_spec.rb
# - https://workingwithruby.com/wwrt/good_oo
#
# - rubocop-thread_safety
##
# NOTE: Custom Standard cop that should be loaded before `config/base.yml`.
# - https://github.com/standardrb/standard-custom/blob/main/lib/standard/cop/block_single_line_braces.rb
#
- standard/cop/block_single_line_braces
inherit_gem:
standard: config/base.yml
AllCops:
##
# https://github.com/testdouble/standard#how-do-i-specify-a-ruby-version-what-is-supported
#
TargetRubyVersion: 2.7
Exclude:
##
# NOTE: Excludes `vendor` and git-ignored `TODO` folders from linting. Needed by GitHub Actions.
# - https://github.com/rubocop/rubocop/issues/9832
# - https://github.com/rubocop/rubocop/issues/9832#issuecomment-873398952
#
- vendor/**/*
- TODO/**/*
##
# NOTE: Excludes dependencies from linting.
#
- lib/convenient_service/dependencies/**/*
##
# NOTE: Forces to use `# frozen_string_literal: true` in every Ruby file.
# - https://docs.rubocop.org/rubocop/cops_style.html#stylefrozenstringliteralcomment
#
Style/FrozenStringLiteralComment:
Enabled: true
EnforcedStyle: always_true
# MagicNumbers:
# Exclude:
# ##
# # NOTE: Excludes the following files/folders from linting magic numbers.
# # - https://github.com/meetcleo/rubocop-magic_numbers
# # - https://docs.rubocop.org/rubocop/configuration.html#includingexcluding-files
# #
# - Rakefile
# - benchmark/**/*
# - spec/**/*
# - test/**/*