Add on_system to and reorder component order cop
This commit is contained in:
parent
423aac0d61
commit
a4327521d5
@ -29,6 +29,10 @@ FORMULA_COMPONENT_PRECEDENCE_LIST = [
|
||||
[{ name: :depends_on, type: :method_call }],
|
||||
[{ name: :uses_from_macos, type: :method_call }],
|
||||
[{ name: :on_macos, type: :block_call }],
|
||||
*MacOSVersions::SYMBOLS.keys.map do |os_name|
|
||||
[{ name: :"on_#{os_name}", type: :block_call }]
|
||||
end,
|
||||
[{ name: :on_system, type: :block_call }],
|
||||
[{ name: :on_linux, type: :block_call }],
|
||||
[{ name: :on_arm, type: :block_call }],
|
||||
[{ name: :on_intel, type: :block_call }],
|
||||
|
||||
@ -15,7 +15,7 @@ module RuboCop
|
||||
extend AutoCorrector
|
||||
|
||||
def on_system_methods
|
||||
@on_system_methods ||= [:intel, :arm, :macos, :linux, *MacOSVersions::SYMBOLS.keys].map do |m|
|
||||
@on_system_methods ||= [:intel, :arm, :macos, :linux, :system, *MacOSVersions::SYMBOLS.keys].map do |m|
|
||||
:"on_#{m}"
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user