Skip to content

Commit

Permalink
Fix filename, script issues (#4)
Browse files Browse the repository at this point in the history
* Fix filename for line length check and add copy to dockerfile

* Excludes `docs/images` from whitespace search

* Add a space in between echo and argument

Co-authored-by: rem1776 <Ryan.Mulhall@lscamd50-d.gfdl.noaa.gov>
  • Loading branch information
rem1776 and rem1776 authored Nov 10, 2021
1 parent 2fbe03a commit fd06334
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ RUN apt-get update && \
COPY lint.sh lint.sh
COPY whitespace_check.sh whitespace_check.sh
COPY ftn_tab_check.sh ftn_tab_check.sh
COPY ftn_line_length_check.sh ftn_line_length_check.sh

ENTRYPOINT ["/lint.sh"]
File renamed without changes.
2 changes: 1 addition & 1 deletion lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ fi
fllen_nfiles=$(wc -l /tmp/fllen.out | awk '{print $1}')
if test $fllen_nfiles -gt 0
then
echo"::error::${fllen_nfiles} Fortran file(s) contain(s) lines longer than $INPUT_FTN_LINE_LEN characters"
echo "::error::${fllen_nfiles} Fortran file(s) contain(s) lines longer than $INPUT_FTN_LINE_LEN characters"
cat /tmp/fllen.out
fi

Expand Down
4 changes: 2 additions & 2 deletions whitespace_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ trailing_space ()
}
export -f trailing_space

# Find all files in the working directory, ignoring the `.git` directory that
# Find all files in the working directory, ignoring the `.git` and `docs/images` directories that
# have trailing whitespace, and prints them to standard out.
find . -type f -not -path "./.git/*" | trailing_space
find . -type f -not -path "./.git/*" -not -path "./docs/images/*" | trailing_space

0 comments on commit fd06334

Please sign in to comment.