-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
71eab52
commit d964c34
Showing
43 changed files
with
32 additions
and
6 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
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Set the maximum allowed length | ||
MAX_LENGTH=200 | ||
# Find all files in the repository and check their path lengths | ||
too_long_paths=0 | ||
|
||
|
||
# Loop through each file path found by find | ||
IFS=$'\n' # Set Internal Field Separator to newline to handle spaces in filenames | ||
for file in $(find . -type f); do | ||
length=${#file} | ||
if (( length > MAX_LENGTH )); then | ||
echo "Path too long: $file ($length characters)" | ||
too_long_paths=$((too_long_paths + 1)) | ||
fi | ||
done | ||
|
||
echo "Files too long: $too_long_paths" | ||
if (( too_long_paths > 0 )); then | ||
echo "Error: Found $too_long_paths file paths longer than $MAX_LENGTH characters." | ||
exit 1 | ||
else | ||
echo "All file paths are within the $MAX_LENGTH character limit." | ||
fi | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.