class RuboCop::Cop::EightyFourCodes::ShellEscape
TODO: Write cop description and example of bad / good code. For every `SupportedStyle` and unique configuration, there needs to be examples. Examples must have valid Ruby syntax. Do not use upticks.
@example EnforcedStyle: bar (default)
# Description of the `bar` style. # bad bad_bar_method # bad bad_bar_method(args) # good good_bar_method # good good_bar_method(args)
@example EnforcedStyle: foo
# Description of the `foo` style. # bad bad_foo_method # bad bad_foo_method(args) # good good_foo_method # good good_foo_method(args)
Constants
- MSG
TODO: Implement the cop in here.
In many cases, you can use a node matcher for matching node pattern. See github.com/rubocop-hq/rubocop/blob/master/lib/rubocop/node_pattern.rb
For example
Public Instance Methods
on_send(node)
click to toggle source
# File lib/rubocop/cop/eighty_four_codes/shell_escape.rb, line 54 def on_send(node) return unless bad_method?(node) add_offense(node) end