-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1698 from davidpfarrell/themes/clean-powerline
Clean Powerline; Add Dir Support to Clean_Files
- Loading branch information
Showing
4 changed files
with
270 additions
and
228 deletions.
There are no files selected for viewing
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,2 +1,29 @@ | ||
####################################################################### | ||
# Allow-list of files to be lint-checked by CI | ||
# | ||
# Directory Suport | ||
# Directory references are allowed within the file, ie: | ||
# | ||
# themes/powerline | ||
# | ||
# All files under the referenced directory will be checked | ||
# | ||
# Checking Files Locally | ||
# You can manually invoke the check via: | ||
# | ||
# lint_clean_files.sh | ||
# | ||
|
||
# root directories | ||
# | ||
docs | ||
|
||
# root files | ||
# | ||
.gitattributes | ||
lint_clean_files.sh | ||
themes/90210/90210.theme.bash | ||
|
||
# themes | ||
# | ||
themes/90210 | ||
themes/powerline |
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,7 +1,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Pull list of checkable files from clean_files.txt | ||
# - Folder references are allowed | ||
# - Empty lines are ignored | ||
# - Comment lines (#) are ignored | ||
# | ||
mapfile -t FILES < clean_files.txt | ||
# shellcheck disable=SC2002 # Prefer 'cat' for cleaner script | ||
mapfile -t FILES < <( | ||
cat clean_files.txt \ | ||
| grep -v -E '^\s*$' \ | ||
| grep -v -E '^\s*#' \ | ||
| xargs -n1 -I{} find "{}" -type f | ||
) | ||
|
||
pre-commit run --files "${FILES[@]}" | ||
# We clear the BASH_IT variable to help the shellcheck checker | ||
# identify source includes within our scripts that require a | ||
# 'source' directive. For more information, see: | ||
# | ||
# "Shellcheck SC1090 - Can't follow non-constant source" | ||
# https://www.shellcheck.net/wiki/SC1090 | ||
# | ||
BASH_IT='' pre-commit run --files "${FILES[@]}" |
Oops, something went wrong.