Skip to content

Instantly share code, notes, and snippets.

@preetpalS
Created August 27, 2020 04:45
Show Gist options
  • Save preetpalS/12838565092cb4f206e07124bd5964e4 to your computer and use it in GitHub Desktop.
Save preetpalS/12838565092cb4f206e07124bd5964e4 to your computer and use it in GitHub Desktop.
# frozen_string_literal: true
commands = [
'brakeman -w3',
'rubocop -ac .rubocop.yml',
'reek -c .reek.yml'
]
# Note if any of the commands does not exit with 0, the whole process fails
commands.each do |command|
fail unless system(command)
end
@preetpalS
Copy link
Author

This file should be placed at the root of your Ruby project.

You have to have each of the tools installed on your path.

The order of the commands in the array is significant in that the later commands will only be run if the prior ones return no error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment