Skip to content
This repository has been archived by the owner on Oct 29, 2022. It is now read-only.

EricCrosson/docker-clang-format-3.8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-clang-format-3.8 Docker Pulls

Docker environment for running clang-format

Install

From dockerhub

docker pull hamroctopus/clang-format-3.8:1.1.0
./bin/build-docker

Manually

./bin/build-docker

Use

Use check-formatting to identify improperly-formatted files

code_format_check:
  image: hamroctopus/clang-format-3.8:1.1.0
  before_script:
    - export FMT_ERROR_MSG="Please run the script /my-repo/fix-formatting to resolve these issues."
  script:
    - find . \( -name packages -o -name .git -o -name .env -o -name 'build*' \) -prune
          -o \( -name '*.h' -o -name '*.hpp' -o -name '*.c' -o -name '*.cpp' \)
          -exec check-formatting {} \+

check-formatting will print the contents of $FMT_ERROR_MSG if improperly-formatted files are detected.

License

ISC © Eric Crosson