aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/.rubocop.yml
blob: f4f80800aa3bba05509e23c68993a5d695ec32df (plain)
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
inherit_from:
  - ../.rubocop.yml
  - .rubocop_todo.yml

AllCops:
  Include:
    - '**/.simplecov'
  Exclude:
    - 'cask/**/*'
    - '**/vendor/**/*'

# `formula do` uses nested method definitions
Lint/NestedMethodDefinition:
  Exclude:
    - 'test/**/*'

Metrics/ModuleLength:
  CountComments: false
  Exclude:
    - 'cask/lib/hbc/locations.rb'
    - 'cask/lib/hbc/macos.rb'
    - 'cask/lib/hbc/utils.rb'

Style/BarePercentLiterals:
  EnforcedStyle: percent_q

Style/BlockDelimiters:
  EnforcedStyle: semantic
  FunctionalMethods:
    - expect
    - find
    - let
    - let!
    - subject
    - watch
    - inject
    - map
    - map!
    - collect
    - collect!
    - reject
    - reject!
    - delete_if
    - with_object
    - popen_read
  ProceduralMethods:
    - after
    - at_exit
    - before
    - benchmark
    - bm
    - bmbm
    - capture_io
    - capture_output
    - capture_subprocess_io
    - chdir
    - context
    - create
    - define_method
    - define_singleton_method
    - fork
    - measure
    - new
    - open
    - realtime
    - shutup
    - tap
    - each
    - each_pair
    - each_with_index
    - reverse_each
    - ignore_interrupts
  IgnoredMethods:
    - each_with_object
    - it
    - its
    - lambda
    - proc
    - formula
    - mock
    - devel
    - stable
    - head
    - assert_raises
    - assert_nothing_raised
    - resource
    - with_build_environment
    - ensure_writable
    - satisfy
    - fetch
    - brew
    - expand
    - env
    - recursive_dependencies
    - trap
    - link_dir
    - with_system_path

Style/HashSyntax:
  EnforcedStyle: ruby19_no_mixed_keys

# we won't change backward compatible method names
Style/MethodName:
  Exclude:
    - 'compat/**/*'

# we won't change backward compatible predicate names
Style/PredicateName:
  Exclude:
    - 'compat/**/*'
  NameWhitelist: is_32_bit?, is_64_bit?