Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@for_app('brew', at_least=2)
def match(command):
return (command.script_parts[1] in ['ln', 'link']
and "brew link --overwrite --dry-run" in command.output)
@for_app('python')
def match(command):
return not command.script.endswith('.py')
@for_app('javac')
def match(command):
return not command.script.endswith('.java')
@for_app('prove')
def match(command):
return (
'NOTESTS' in command.output
and not any(_is_recursive(part) for part in command.script_parts[1:])
and any(_isdir(part) for part in command.script_parts[1:]))
@for_app('sed')
def match(command):
return "unterminated `s' command" in command.output
@for_app('brew', at_least=2)
def match(command):
return ('update' in command.script
and "Error: This command updates brew itself" in command.output
and "Use 'brew upgrade '" in command.output)
@for_app('ls')
def match(command):
return command.output.strip() == ''
@for_app('mvn')
def match(command):
failed_lifecycle = _get_failed_lifecycle(command)
available_lifecycles = _getavailable_lifecycles(command)
return available_lifecycles and failed_lifecycle
@for_app('go')
def match(command):
return (command.script.startswith('go run ')
and not command.script.endswith('.go'))
@for_app('yarn')
def match(command):
return regex.findall(command.stderr)