Slight improvements to the code formatter.

This commit is contained in:
Nicolas "Pixel" Noble
2018-12-21 03:53:38 +01:00
parent 2e456bbc8b
commit a1ec91319a
3 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -12,8 +12,8 @@ FROM ubuntu:18.04 AS run
RUN apt-get -y update
RUN apt-get -y install apt-utils
RUN apt-get -y dist-upgrade
RUN apt-get -y install clang-format
RUN apt-get -y install clang-format tofrodos
COPY --from=build /bin/tabremover /bin
COPY run-format.sh .
CMD ["bash"]
CMD ["/run-format.sh"]
+1 -1
View File
@@ -3,4 +3,4 @@
cd $(dirname $0)/../..
docker build -t code-format tools/code-format
docker run --rm=true -v "$(pwd)":/repository --user "$(id -u):$(id -g)" -t code-format /run-format.sh
docker run --rm=true -v "$(pwd)":/repository --user "$(id -u):$(id -g)" -t code-format
+1
View File
@@ -4,6 +4,7 @@ cd repository/src
find . -name *.c -or -name *.cc -or -name *.h | while read f ; do
echo "$f"
fromdos "$f"
tabremover -t 8 "$f" "$f".2
mv "$f.2" "$f"
clang-format --style=file "$f" > "$f.2"