From 7d75cfb8e6403c6649f23c4f0cfb7a9cd40206fc Mon Sep 17 00:00:00 2001 From: Maryam Tahhan Date: Fri, 26 Jul 2024 05:00:24 -0400 Subject: [PATCH 1/5] workflow: add cppcheck action Signed-off-by: Maryam Tahhan --- .github/workflows/cppcheck.yaml | 21 +++++++++++++++++++++ README.md | 1 - 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/cppcheck.yaml diff --git a/.github/workflows/cppcheck.yaml b/.github/workflows/cppcheck.yaml new file mode 100644 index 00000000..efe85085 --- /dev/null +++ b/.github/workflows/cppcheck.yaml @@ -0,0 +1,21 @@ +name: cppcheck-action-test +on: [push] # yamllint disable-line rule:truthy + +jobs: + build: + name: cppcheck-test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: cppcheck + uses: deep5050/cppcheck-action@main + with: + github_token: ${{ secrets.GITHUB_TOKEN}} + + + - name: publish report + uses: mikeal/publish-to-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH_NAME: 'main' diff --git a/README.md b/README.md index c2aaec57..70dfd120 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ - # CNDP - Cloud Native Data Plane ![GitHub Workflow Status (event)](https://img.shields.io/github/actions/workflow/status/CloudNativeDataPlane/cndp/smoke.yml) From 79b3f0f78855926895332a7a73a83b8ba8a10be3 Mon Sep 17 00:00:00 2001 From: Maryam Tahhan Date: Fri, 26 Jul 2024 05:10:55 -0400 Subject: [PATCH 2/5] github: add pre-commit workflow Signed-off-by: Maryam Tahhan --- .github/workflows/pre-commit.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 00000000..71ea3752 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,14 @@ +name: pre-commit + +on: # yamllint disable-line rule:truthy + pull_request: + push: + branches: [main] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - uses: pre-commit/action@v3.0.1 From ad0369bfe24fa2db72cf4b0a407c741b85b04913 Mon Sep 17 00:00:00 2001 From: Maryam Tahhan Date: Fri, 26 Jul 2024 05:13:34 -0400 Subject: [PATCH 3/5] pre-commit: change markdown linter Signed-off-by: Maryam Tahhan --- .cndpstyle.rb | 17 ----------------- .markdownlint.json | 42 +++++++++++++++++++++++++++++++++++++++++ .mdlrc | 2 -- .pre-commit-config.yaml | 11 +++-------- 4 files changed, 45 insertions(+), 27 deletions(-) delete mode 100644 .cndpstyle.rb create mode 100644 .markdownlint.json delete mode 100644 .mdlrc diff --git a/.cndpstyle.rb b/.cndpstyle.rb deleted file mode 100644 index 628053e9..00000000 --- a/.cndpstyle.rb +++ /dev/null @@ -1,17 +0,0 @@ -# Style configuration for CNDP documentation files. -# -# For details on how to configure, see [markdownlint docs][1]. -# -# For explanation of the rules themselves, see [markdownlint's RULES.md][2] -# -# [1]: https://github.com/markdownlint/markdownlint/blob/master/docs/creating_styles.md -# [2]: https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md - -all -rule "ul-indent", indent: 4 - -rule "ul-style", style: :dash -rule "no-duplicate-header", allow_different_nesting: true -rule "line-length", :line_length => 165 -rule 'MD010', :indent => 3 -# exclude_rule 'MD010' # Hard tabs diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 00000000..ff92c0bf --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,42 @@ +{ + "code-block-style": { + "style": "fenced" + }, + "code-fence-style": { + "style": "backtick" + }, + "heading-style": { + "style": "atx" + }, + "hr-style": { + "style": "---" + }, + "line-length": { + "strict": false, + "code_blocks": false + }, + "proper-names": { + "code_blocks": false, + "names": [ + "Markdown", + "markdown-it", + "markdownlint", + "markdownlint-cli2" + ] + }, + "strong-style": { + "style": "asterisk" + }, + "table-pipe-style": { + "style": "leading_and_trailing" + }, + "ul-style": { + "style": "dash" + }, + "no-duplicate-header" : { + "allow_different_nesting": true + }, + "MD033" : false, + "MD041": false, + "MD045": false +} diff --git a/.mdlrc b/.mdlrc deleted file mode 100644 index a0cb947d..00000000 --- a/.mdlrc +++ /dev/null @@ -1,2 +0,0 @@ -style ".cndpstyle.rb" -ignore_front_matter true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 229cc971..601bd78e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,15 +21,10 @@ repos: rev: v1.59.1 hooks: - id: golangci-lint - - repo: https://github.com/markdownlint/markdownlint.git - rev: v0.13.0 + - repo: https://github.com/DavidAnson/markdownlint-cli2 + rev: v0.9.2 hooks: - - id: markdownlint_docker - name: Markdownlint Docker - description: Run markdown lint on your Markdown files using the project docker image - language: docker_image - files: \.(md|mdown|markdown)$ - entry: markdownlint/markdownlint -c .mdlrc + - id: markdownlint-cli2-rules-docker - repo: https://github.com/codespell-project/codespell rev: v2.3.0 hooks: From 76ecad10d12cf345124e44682f16caa82d5b6a7e Mon Sep 17 00:00:00 2001 From: Maryam Tahhan Date: Fri, 26 Jul 2024 05:16:40 -0400 Subject: [PATCH 4/5] pre-commit: run on codebase Signed-off-by: Maryam Tahhan --- examples/cnet-quic/README.md | 3 ++- usrtools/txgen/INSTALL.md | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/cnet-quic/README.md b/examples/cnet-quic/README.md index 033b92f6..baef1403 100644 --- a/examples/cnet-quic/README.md +++ b/examples/cnet-quic/README.md @@ -14,8 +14,9 @@ this test we are going to use 4433 instead. Use two machines to make it easy to setup and configure, plus connect the machines back to back with a cable. + ## Remote machine setup, this machine will not run CNDP, but use the quicly example applications - + Setup the interface connected to the other machine, use your own netdev interface name diff --git a/usrtools/txgen/INSTALL.md b/usrtools/txgen/INSTALL.md index d7fc3651..1ee6ef0e 100644 --- a/usrtools/txgen/INSTALL.md +++ b/usrtools/txgen/INSTALL.md @@ -5,7 +5,7 @@ frames.** \*\* (TXGen) Sounds like 'Packet-Gen'\*\* -______________________________________________________________________ +--- **Copyright © \\2019-2022\\ Intel Corporation. All rights reserved.** @@ -36,7 +36,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SPDX-License-Identifier: BSD-3-Clause -______________________________________________________________________ +--- ## Installation From f6e01fb1ea720cd66d52c356b4a9aa944cd76b45 Mon Sep 17 00:00:00 2001 From: Maryam Tahhan Date: Fri, 26 Jul 2024 07:33:15 -0400 Subject: [PATCH 5/5] pre-commit: remove golang linting Signed-off-by: Maryam Tahhan --- .golangci.yml | 6 ------ .pre-commit-config.yaml | 6 +----- 2 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 .golangci.yml diff --git a/.golangci.yml b/.golangci.yml deleted file mode 100644 index 3d347120..00000000 --- a/.golangci.yml +++ /dev/null @@ -1,6 +0,0 @@ -run: - timeout: 5m -linters: - disable-all: true - enable: - - gofmt diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 601bd78e..c6226fbb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,10 +17,6 @@ repos: - id: clang-format types_or: [c++, c] args: [-i, --style=file] - - repo: https://github.com/golangci/golangci-lint - rev: v1.59.1 - hooks: - - id: golangci-lint - repo: https://github.com/DavidAnson/markdownlint-cli2 rev: v0.9.2 hooks: @@ -32,4 +28,4 @@ repos: args: [--toml, cndp-codespell.precommit-toml] additional_dependencies: - tomli -exclude: doc/api/doxy-api-index.md|lang/rs/wireguard/patch/* +exclude: doc/api/doxy-api-index.md|lang/rs/wireguard/patch/000*.*