Skip to content

Instantly share code, notes, and snippets.

View developerby's full-sized avatar

Sergiusz Dziemidowicz developerby

View GitHub Profile
@developerby
developerby / aliases for rubocop
Last active December 14, 2022 21:59
Ruby / Rubocop / ZSH/BASH aliases
# Run rubocop only for the latest commit. For cases when you forgot to check rubocop before committing.
alias rh='git diff-tree --no-commit-id --name-only -r HEAD | xargs ls -1 2>/dev/null | grep '\.rb$' | xargs rubocop'
Run rubocop only for changed files.
alias rl='git ls-files -m | xargs ls -1 2>/dev/null | grep '\.rb$' | xargs rubocop'