From d17a1defe378f616b4ec113d632183087f2afd19 Mon Sep 17 00:00:00 2001 From: rex-schilasky <49162693+rex-schilasky@users.noreply.github.com> Date: Sat, 17 Feb 2024 10:07:47 +0100 Subject: [PATCH] clang tidy gh action added --- .github/ISSUE_TEMPLATE/bug_report.md | 31 ----- .github/ISSUE_TEMPLATE/bug_report.yml | 154 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/enhancement.yml | 59 +++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 --- .github/pull_request_template.md | 52 ++------ .github/workflows/clang-tidy-review.yml | 67 ++++++++++ 6 files changed, 294 insertions(+), 89 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/enhancement.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/workflows/clang-tidy-review.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 0b20bb6..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. Ubuntu] - - Version [e.g. 20.04] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..f8ad7a5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,154 @@ +# This template is inspired by: +# https://github.com/executablebooks/.github/blob/master/.github/ISSUE_TEMPLATE/bug_report.yml +name: 🐛 Report a problem +description: Problem reports are for when something behaves incorrectly, or differently from how you'd expect. +body: +- type: markdown + attributes: + value: | + # Welcome + + Thank you very much for reporting an issue to us, we appreciate that! 🙏 + Please fill out the form below, so we can obtain all required information and fix the issue as fast as possible! + +- type: markdown + attributes: + value: | + # Problem Report + +- type: textarea + id: describe + attributes: + label: Problem Description + description: | + Provide a short description (one or two sentences) about the problem. + + If possible, provide screenshots or error messages that you've encountered. + placeholder: | + When I do ___, I expect that ___ would occur. + However, instead ___ happens. + This is a problem for people doing ___ because ___. + + --- + + When compiling an eCAL Application on my ___ device, I encounter the following build issues: + ``` + my build issues + ``` + + validations: + required: true + +- type: textarea + id: reproduce + attributes: + label: How to reproduce + description: | + Provide information that others may use to re-produce this behavior. + For example: + + - Step-by-step instructions that others can follow. + - (Minimal) source-code that shows the bug. + - Information about certain conditions that trigger the bug. + + placeholder: | + 1. Go to '...' + 2. Click on '....' + + Here is the source code triggering the issue: + ```cpp + my { code } + ``` + + This is my CMake command line: `cmake .. -DMY_VAR=ON` + validations: + required: true + +- type: dropdown + id: download + attributes: + label: How did you get eCAL? + options: + - I don't know + - Download from Release Page + - Ubuntu PPA (apt-get) + - Custom Build / Built from source + - Other + validations: + required: true + +- type: textarea + id: environment + attributes: + label: Environment + description: | + List your + + - eCAL Version + - Operating System + - Python Version _(for python related issues)_ + - CMake and compiler version _(for build related issues)_ + - Versions of any other relevant tools you're using. + + placeholder: | + - eCAL: + - OS: + - Python: + - CMake: + - gcc: + - ... + + validations: + required: true + +- type: textarea + id: ecal_system_information + attributes: + label: eCAL System Information + description: | + If available, paste the eCAL Mon System information here. + You can obtain it from the eCAL Monitor, or by calling `ecal_config` from a terminal. + + _If your problem is e.g. build related, just leave this box empty._ + + render: text + placeholder: | + ------------------------- SYSTEM --------------------------------- + Version : v5.10.4 (13.12.2022) + Platform : x64 + + ------------------------- CONFIGURATION -------------------------- + Default INI : C:\ProgramData\eCAL\ecal.ini + + ------------------------- NETWORK -------------------------------- + Host name : FRLBJRXW + Network mode : cloud + Network ttl : 2 + Network sndbuf : 5 MByte + Network rcvbuf : 5 MByte + Multicast group : 239.0.0.1 + Multicast mask : 0.0.0.15 + Multicast ports : 14000 - 14010 + Bandwidth limit (udp) : not limited + + ------------------------- TIME ----------------------------------- + Synchronization realtime : "ecaltime-localtime" + Synchronization replay : + State : synchronized + Master / Slave : Master + Status (Code) : "everything is fine." (0) + + ------------------------- PUBLISHER LAYER DEFAULTS --------------- + Layer Mode INPROC : off + Layer Mode SHM : auto + Layer Mode TCP : off + Layer Mode UDP MC : auto + + ------------------------- SUBSCRIPTION LAYER DEFAULTS ------------ + Layer Mode INPROC : on + Layer Mode SHM : on + Layer Mode TCP : on + Layer Mode UDP MC : on + Npcap UDP Reciever : off + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/enhancement.yml b/.github/ISSUE_TEMPLATE/enhancement.yml new file mode 100644 index 0000000..b78936d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/enhancement.yml @@ -0,0 +1,59 @@ +# Inspired by +# - https://www.backhub.co/blog/best-practices-for-using-github-issues +# - https://medium.com/nyc-planning-digital/writing-a-proper-github-issue-97427d62a20f +# - https://wiredcraft.com/blog/how-we-write-our-github-issues/ +name: 💡 Request an enhancement +description: Suggest an idea for this project. +body: +- type: markdown + attributes: + value: | + # Welcome + + Thank you very much for providing your enhancement idea, we appreciate that! 🙏 + Please describe your idea to us, so we can have a qualified discussion together and make eCAL better! + +- type: markdown + attributes: + value: | + # Enhancement suggestion + +- type: textarea + id: context + attributes: + label: Context + description: | + - Provide background to help others understand this issue. + - Describe the problem or need you'd like to address. + validations: + required: true + + +- type: textarea + id: proposal + attributes: + label: Proposal + description: | + - A simple and clear description of what you're proposing. + - Ideas or constraints for how to implement this proposal + - Important considerations to think about or discuss + validations: + required: false + + +- type: textarea + id: tasks + attributes: + label: Tasks and updates + description: | + Use this area to track ongoing work and to-do items. + The more specific the better. + + _If you can't think of anything then just leave this blank and we can fill it in later! This can be filled in as we understand more about an issue._ + + placeholder: | + - [ ] Discuss and decide on what to do... + - [ ] Implement partial feature A... + + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index bbcbbe7..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a3b1f82..ffde295 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,38 +1,14 @@ -**Pull request type** - - - - - -Please check the type of change your PR introduces: -- [ ] Bugfix -- [ ] Feature -- [ ] Code style update (formatting, renaming) -- [ ] Refactoring (no functional changes, no api changes) -- [ ] Build related changes -- [ ] Documentation content changes -- [ ] Other (please describe): - - -**What is the current behavior?** - - -Issue Number: N/A - -**What is the new behavior?** - - -- -- -- - -**Does this introduce a breaking change?** - -- [ ] Yes -- [ ] No - - - -**Other information** - - +### Description + + +### Related issues + +- + +### Cherry-pick to + diff --git a/.github/workflows/clang-tidy-review.yml b/.github/workflows/clang-tidy-review.yml new file mode 100644 index 0000000..10ef4dc --- /dev/null +++ b/.github/workflows/clang-tidy-review.yml @@ -0,0 +1,67 @@ +name: clang-tidy-review + +on: + pull_request: + paths: + - '**.cpp' + - '**.cxx' + - '**.cc' + - '**.h' + - '**.hxx' + - '**.c' + - '**.hpp' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + review: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: 'true' + fetch-depth: 0 + + - name: Run clang-tidy + uses: ZedThree/clang-tidy-review@v0.14.0 + id: review + with: + build_dir: _build + apt_packages: "cmake,ninja-build,libprotobuf-dev,libprotoc-dev,protobuf-compiler" + config_file: ".clang-tidy" + exclude: "thirdparty/*,_build/*,convert_utf.cpp,convert_utf.h,tests/*" + split_workflow: true + lgtm_comment_body: "" + cmake_command: | + cmake . -B _build \ + -G Ninja \ + -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ + -DECAL_CORE_BUILD_SAMPLES=ON \ + -DECAL_CORE_BUILD_SAMPLES_PROTOBUF=ON \ + -DECAL_CORE_BUILD_TESTS=ON \ + -DECAL_CORE_BUILD_TESTS_PROTOBUF=ON \ + -DECAL_CORE_CONFIG_INIFILE=ON \ + -DECAL_CORE_COMMAND_LINE=ON \ + -DECAL_CORE_REGISTRATION=ON \ + -DECAL_CORE_REGISTRATION_SHM=ON \ + -DECAL_CORE_MONITORING=ON \ + -DECAL_CORE_PUBLISHER=ON \ + -DECAL_CORE_SUBSCRIBER=ON \ + -DECAL_CORE_SERVICE=ON \ + -DECAL_CORE_TIMEPLUGIONN=ON \ + -DECAL_CORE_TRANSPORT_UDPON=ON \ + -DECAL_CORE_TRANSPORT_TCPON=ON \ + -DECAL_CORE_TRANSPORT_SHMON=ON \ + -DECAL_CORE_NPCAP_SUPPORT=OFF \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_SYSCONFDIR=/etc \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LOCALSTATEDONIR=/var \ + -DCMAKE_INSTALL_LIBDIR=lib/x86_FF4-linux-gnu + cmake --build _build + + - uses: ZedThree/clang-tidy-review/upload@v0.14.0