mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
20 lines
391 B
Bash
Executable File
20 lines
391 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Usage
|
|
#
|
|
# 1. Clean any git unstagged or untracked changes. Consider creating a new branch
|
|
# 2. Remove a cop's exclusion paragraph from the .rubocop_todo.yml
|
|
# 3. Run:
|
|
#
|
|
# $ ./script/rubocop_autocorrect <removed_cop_name>
|
|
#
|
|
# This will commit all the changes.
|
|
|
|
set -e
|
|
|
|
COP="$1"
|
|
|
|
bundle exec rubocop -a --only "$COP"
|
|
git add -A
|
|
git commit -m "Auto correct Rubocop's ${COP} cop"
|