From d3387e252b65905616e8903c08a055a838a79b83 Mon Sep 17 00:00:00 2001 From: Carlos Date: Sat, 11 Jan 2025 10:58:01 -0800 Subject: [PATCH] Clang Format YML - make a workflow to check clang format for me - updated readme tables again. --- .github/workflows/clang_format.yml | 18 ++++++++++++++++++ README.rst | 6 +++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/clang_format.yml diff --git a/.github/workflows/clang_format.yml b/.github/workflows/clang_format.yml new file mode 100644 index 0000000..b1d4861 --- /dev/null +++ b/.github/workflows/clang_format.yml @@ -0,0 +1,18 @@ +name: Clang-format + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + check-formatting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DoozyX/clang-format-check@v1.1.0 + with: + source: '../ezsnmp/.' + extensions: 'c,cpp,h,hpp' + clangFormatVersion: 20 \ No newline at end of file diff --git a/README.rst b/README.rst index ba726c6..d8503e2 100644 --- a/README.rst +++ b/README.rst @@ -2,12 +2,16 @@ EzSnmp ======= -|Python Code Style| |Black| |Pull Request Sphinx Docs Check| |PyPI Distributions| |TestPyPI Distributions| |Tests| |License| +|Python Code Style| |Clang-format Code Style| |Black| |Clang-format| |Pull Request Sphinx Docs Check| |PyPI Distributions| |TestPyPI Distributions| |Tests Homebrew| |Tests Native| |License| .. |Python Code Style| image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/psf/black +.. |Clang-format Code Style| image:: https://img.shields.io/badge/code%20style-clang--format-brightgreen.svg + :target: https://clang.llvm.org/docs/ClangFormat.html .. |Black| image:: https://github.com/carlkidcrypto/ezsnmp/actions/workflows/black.yml/badge.svg :target: https://github.com/carlkidcrypto/ezsnmp/actions/workflows/black.yml +.. |Clang-format| image:: https://github.com/carlkidcrypto/ezsnmp/actions/workflows/clang_format.yml/badge.svg + :target: https://github.com/carlkidcrypto/ezsnmp/actions/workflows/clang_format.yml .. |Pull Request Sphinx Docs Check| image:: https://github.com/carlkidcrypto/ezsnmp/actions/workflows/sphinx_build.yml/badge.svg :target: https://github.com/carlkidcrypto/ezsnmp/actions/workflows/sphinx_build.yml .. |PyPI Distributions| image:: https://github.com/carlkidcrypto/ezsnmp/actions/workflows/build_and_publish_to_pypi.yml/badge.svg