Skip to content

Commit

Permalink
fix trailblank and sort .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
lcn2 committed Jul 12, 2024
1 parent 2a4f399 commit 56153d6
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 10 deletions.
16 changes: 8 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#
*~
*.BAK
.DS_Store
core*
.DS_Store
*.dSYM/
*.exe
*.[oa]
Expand All @@ -16,13 +16,11 @@ core*
# files and directories created during the building of calc and other Makefile actions
#
# NOTE: While many of these might be part of a released calc tarball, they are
# not consider development source. Some other file(s) and/or programs
# generate these files.
# not consider development source. Some other file(s) and/or programs
# generate these files.
#
# We sort the list below via: sort -d -u
#
Makefile.our
NOTES
align32
align32.h
align32_tmp
Expand All @@ -42,13 +40,13 @@ chk_c
conf.h
const_tmp
cscript/4dsphere
cscript/README
cscript/.all
cscript/fproduct
cscript/mersenne
cscript/piforever
cscript/plus
cscript/powerterm
cscript/README
cscript/simple
cscript/square
custom/.all
Expand Down Expand Up @@ -128,8 +126,6 @@ have_urandom.h
have_ustat
have_ustat.h
have_varvs
help/COPYING
help/COPYING-LGPL
help/.all
help/binding
help/bindings
Expand All @@ -140,6 +136,8 @@ help/change
help/changes
help/contrib
help/copy
help/COPYING
help/COPYING-LGPL
help/cscript
help/custom_cal
help/errorcode
Expand All @@ -163,8 +161,10 @@ libcustcalc.*
ll_tmp
longbits
longbits.h
Makefile.our
memmv_tmp
newstr_tmp
NOTES
offscl_tmp
outfile
posscl_tmp
Expand Down
33 changes: 31 additions & 2 deletions trailblank
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ PICKY_PHASE_1=$(
-name '.git' -o -path './custom/libcustcalc*' -o -path './libcustcalc*' -o \
-name 'sample_many-static' -o -name 'sample_rand-static' -o \
-name 'codeql-analysis.yml' -o -name tags -o -name '*.out' -o \
-name '?' -o -iname '*foo*' -o -iname '*bar*' -o -iname '*baz*' -o \
-iname '*curds*' -o -iname '*whey*' -o -iname '*rmme*' \
-iname '*foo*' -o -iname '*bar*' -o -iname '*baz*' -o \
-name '.lldbinit' -o -iname '*curds*' -o -iname '*whey*' -o -iname '*rmme*' \
\) -prune -o -type f -print0 | \
if [[ -x /usr/local/bin/picky ]]; then
xargs -0 /usr/local/bin/picky -s -v -w132
Expand Down Expand Up @@ -218,6 +218,35 @@ if [[ -n $BACKUP_MAKEILES ]]; then
EXIT_CODE=7
fi


# look for ASCII tabs in non-Makefiles
#
TABS_FOUND=$(
find . \( -path './NOTES' -o -path './calc' -o -path './ver_calc' -o \
-name '*.o' -o -name '*.a' -o -name '*ptch*' -o -name 'core*' -o \
-name '*.orig' -o -name '*.rej' -o -name '*.bak' -o \
-name '*.ptch' -o -name 'core.*' -o \
-name '*.so*' -o -name 'calc-static' -o -name 'libcalc.*' -o \
-name 'sample_many' -o -name 'sample_rand' -o -name 'errcode' -o \
-path './help/funclist' -o -path './have_stdvs' -o \
-path './endian' -o -path './no_implicit' -o -name 'chk_c' -o \
-path './longbits' -o -name '.*.swp' -o -name 'conf.h' -o \
-name '.git' -o -path './custom/libcustcalc*' -o -path './libcustcalc*' -o \
-name 'sample_many-static' -o -name 'sample_rand-static' -o \
-name 'codeql-analysis.yml' -o -name tags -o -name '*.out' -o \
-iname '*foo*' -o -iname '*bar*' -o -iname '*baz*' -o \
-name '.lldbinit' -o -iname '*curds*' -o -iname '*whey*' -o -iname '*rmme*' -o \
-iname 'Makefile*' -o -name rpm.mk -o -name 'trailblank' \
\) -prune -o -type f -print0 | \
xargs -0 grep -l -E ' '
)
if [[ -n $TABS_FOUND ]]; then
echo
echo '# ASCII TABs found in non-Makefiles:'
echo "$TABS_FOUND"
EXIT_CODE=8
fi

# All Done!!! -- Jessica Noll, Age 2
#
exit "$EXIT_CODE"

0 comments on commit 56153d6

Please sign in to comment.