Skip to content

Filter out external dependencies from Codeql #112

Filter out external dependencies from Codeql

Filter out external dependencies from Codeql #112

name: Check Code Formatting for AD-RSS Library
on:
push:
branches: master
pull_request:
branches: master
permissions:
contents: read
jobs:
check_cpp:
name: Check Code Formatting
runs-on: ubuntu-20.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
with:
submodules: true
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install clang-format-10
- name: Check Formatting
run: failed=0; for file in `find . -path ./dependencies -prune -false -o -iname *.cpp -o -iname *.hpp`; do if [ `clang-format-10 $file -output-replacements-xml | grep -c "<replacement "` -ne 0 ]; then echo "$file does not match codeing style. Please run clang-format-10"; failed=1; fi; if [ $failed -ne 0 ]; then exit 1; fi; done