-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add cpp-quality workflow + apply fixes
- Loading branch information
Showing
47 changed files
with
750 additions
and
359 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Clang Tidy - Config | ||
--- | ||
Checks: '-* | ||
bugprone-*, | ||
-bugprone-easily-swappable-parameters | ||
cert-*, | ||
-cert-err33-c | ||
cppcoreguidelines-*, | ||
-cppcoreguidelines-pro-bounds-pointer-arithmetic | ||
-cppcoreguidelines-pro-type-vararg | ||
-cppcoreguidelines-avoid-c-arrays | ||
-cppcoreguidelines-no-malloc | ||
-cppcoreguidelines-owning-memory | ||
-cppcoreguidelines-pro-bounds-array-to-pointer-decay | ||
misc-*, | ||
-misc-include-cleaner | ||
modernize-*, | ||
-modernize-use-trailing-return-type | ||
performance-*, | ||
readability-*, | ||
-readability-identifier-length | ||
-readability-function-cognitive-complexity | ||
-readability-static-accessed-through-instance | ||
' | ||
|
||
WarningsAsErrors: '*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# | ||
# .github/workflows/cpp-quality.yml | ||
# | ||
# Copyright 2024 Jens A. Koch. | ||
# SPDX-License-Identifier: MIT | ||
# This file is part of jakoch/wikifolio_universe_converter. | ||
# | ||
|
||
name: "C++ Quality" | ||
|
||
on: | ||
- push | ||
- pull_request | ||
# You can manually run this workflow. | ||
- workflow_dispatch | ||
|
||
# improve CI concurrency by automatically cancelling outdated jobs | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
|
||
# --------------------------------------------------------------------------------------- | ||
|
||
clang-format: | ||
|
||
# --------------------------------------------------------------------------------------- | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: 🤘 Checkout Code | ||
uses: actions/checkout@v4 # https://github.com/actions/checkout | ||
|
||
- name: 🔽 Install dos2unix | ||
run: sudo apt-get install -y dos2unix | ||
|
||
- name: 🔽 Install clang-format-18 | ||
run: | | ||
wget https://apt.llvm.org/llvm.sh | ||
chmod +x ./llvm.sh | ||
sudo ./llvm.sh 18 | ||
sudo apt-get install -y clang-format-18 | ||
- name: Check formatting | ||
run: ./format.sh && git diff --exit-code | ||
env: | ||
CLANG_FORMAT: clang-format-18 | ||
|
||
# --------------------------------------------------------------------------------------- | ||
|
||
cpplint: | ||
|
||
# --------------------------------------------------------------------------------------- | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: 🤘 Checkout Code | ||
uses: actions/checkout@v4 # https://github.com/actions/checkout | ||
|
||
- name: Setup Python | ||
run: sudo apt-get -y install python3 python3-pip python3-venv | ||
|
||
- name: Setup Python Virtual Env | ||
run: | | ||
export VIRTUAL_ENV=/opt/venv | ||
python3 -m venv $VIRTUAL_ENV | ||
export PATH="$VIRTUAL_ENV/bin:$PATH" | ||
- name: Install cpplint | ||
run: pip install --prefer-binary --no-cache-dir cpplint | ||
|
||
- name: Run lint | ||
run: cpplint --recursive src --exclude=src/steamapi/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.