I’m trying to make a simple Ruby code beautifier to set me at ease. I
know there’s already rbeautify:
But I need to do some more:
comments like these
Comments like these.
E.g. making sure the first letter after "^# " (if any) is always
uppercase and that every comment line ends with a dot.
As well as,
comments like these.
Comments like these. Bla bla. Bla blaaa.
Every comment is always joined into one line.
I’m not sure exactly what approach to take. Whether to build on
rbeautify or not. I also need the functionality from my old shell
for file in $PWD/**/*(.); do
# Check if file is text. # if file -b $file | grep -q 'text'; then # Remove CRLF, blank lines and trailing white space. # # In FreeBSD use: sed -e # tr -d '\r' < $file | sed -E -e 'v/\S/d' -e 's/[[:space:]]+$//' >
mv -f $file.tmp $file echo "$file" fi
Would love to hear what you guys think.
All the best,