-
-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow linting subset of files with bin/lint and fix deprecation errors (
- Loading branch information
Showing
3 changed files
with
15 additions
and
3 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,16 @@ | ||
#!/bin/bash | ||
|
||
bundle exec rubocop -A | ||
bundle exec erblint --lint-all -a | ||
# Note: Any arguments passed in will be passed along to rubocop or erb_lint | ||
# | ||
# Example to only lint Rails models: | ||
# $ bin/lint app/models | ||
# | ||
echo "Running rubocop" | ||
bundle exec rubocop -A $@ | ||
|
||
echo "Running erb_lint" | ||
if [ $# -eq 0 ]; then # If no arguments are supplied check all files | ||
bundle exec erb_lint --lint-all -a | ||
else # otherwise pass those arguments along (likely a specific file or folder) | ||
bundle exec erb_lint $@ -a | ||
fi |