-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Andreas Kern <[email protected]>
- Loading branch information
1 parent
63be117
commit f24a82a
Showing
1 changed file
with
10 additions
and
15 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,22 +1,17 @@ | ||
name: Filename Check | ||
|
||
on: [push, pull_request] | ||
on: [push] | ||
|
||
jobs: | ||
check-filenames: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check filenames for Windows compatibility # currently restricted to doc folder | ||
run: | | ||
with_capitals=$(find doc -type f \( -iname "*.md" -o -iname "*.png" \) | grep -E '/[A-Z]') | ||
# with_invalid_chars=$(find . -type f | grep -E '[<>:"/\\|?*]|[[:cntrl:]]') | ||
# if [ ! -z "$with_capitals" ] || [ ! -z "$with_invalid_chars" ]; then | ||
if [ ! -z "$with_capitals" ]; then | ||
echo "The following files do not follow the naming convention:" | ||
[ ! -z "$with_capitals" ] && echo "Files with capitals:" && echo "$with_capitals" | ||
# [ ! -z "$with_invalid_chars" ] && echo "Files with Windows-restricted characters:" && echo "$with_invalid_chars" | ||
exit 1 | ||
fi | ||
- uses: actions/checkout@v2 | ||
- name: Check for capital letters in filenames in 'doc/manual' | ||
run: | | ||
files_with_caps=$(find doc/manual -type f | grep '[A-Z]') | ||
if [ ! -z "$files_with_caps" ]; then | ||
echo "Files with capital letters:" | ||
echo "$files_with_caps" | ||
exit 1 | ||
fi |