Files
unison/utils/tests/gitlab-ci-code-linting.yml
2022-10-13 19:24:56 +01:00

35 lines
942 B
YAML

# ns-3 CI/CD script with the code-linting stage
#
# Contains jobs to check the ns-3 coding style and perform lint checking.
check-style-clang-format:
stage: code-linting
image: ubuntu:latest
before_script:
- apt update
- DEBIAN_FRONTEND=noninteractive apt install -y
python3
clang-format-14
script:
- python3 utils/check-style-clang-format.py .
timeout: 3h
clang-tidy:
stage: code-linting
image: ubuntu:latest
before_script:
- apt update
- DEBIAN_FRONTEND=noninteractive apt install -y
clang cmake
clang-tidy-14
script:
- ./ns3 configure --enable-examples --enable-tests --enable-clang-tidy
- run-clang-tidy-14 -p cmake-cache/ -quiet 1> clang-tidy-errors.log 2> /dev/null || true
- (! egrep -A 3 "error:|warning:" clang-tidy-errors.log)
- echo "No clang-tidy errors found"
artifacts:
paths:
- clang-tidy-errors.log
when: on_failure
timeout: 3h