-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install pre-commit for CNDP + its configuration. Remove old githook. Signed-off-by: Maryam Tahhan <[email protected]>
- Loading branch information
1 parent
aeb5b8f
commit 8571b66
Showing
117 changed files
with
1,301 additions
and
1,095 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# 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 | ||
|
||
tag :whitespace | ||
tag :headers | ||
tag :ul | ||
tag :indentation | ||
tag :bullet | ||
|
||
rule "ul-indent", indent: 4 | ||
|
||
rule "ul-style", style: :dash | ||
rule "no-duplicate-header", allow_different_nesting: true | ||
rule "line-length", :line_length => 165 | ||
|
||
exclude_rule 'MD010' # Hard tabs |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
name: clang-format | ||
|
||
on: | ||
on: # yamllint disable-line rule:truthy | ||
pull_request: | ||
branches: [ main ] | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DoozyX/[email protected] | ||
with: | ||
source: '.' | ||
exclude: './examples/vpp-plugin' | ||
extensions: 'c,h,cc,cpp' | ||
clangFormatVersion: 15.0.2 | ||
- uses: actions/checkout@v4 | ||
- uses: DoozyX/[email protected] | ||
with: | ||
source: '.' | ||
exclude: './examples/vpp-plugin' | ||
extensions: 'c,h,cc,cpp' | ||
clangFormatVersion: 15.0.2 |
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
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
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,2 @@ | ||
style ".cndpstyle.rb" | ||
ignore_front_matter true |
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,63 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-added-large-files | ||
- repo: https://github.com/adrienverge/yamllint | ||
rev: v1.35.1 | ||
hooks: | ||
- id: yamllint | ||
- repo: https://github.com/pre-commit/mirrors-clang-format | ||
rev: v17.0.6 | ||
hooks: | ||
- id: clang-format | ||
name: clang-format | ||
entry: clang-format -i | ||
language: python | ||
'types_or': [c] | ||
args: ["-style=file"] | ||
require_serial: false | ||
minimum_pre_commit_version: '2.9.2' | ||
- repo: https://github.com/golangci/golangci-lint | ||
rev: v1.59.1 | ||
hooks: | ||
- id: golangci-lint | ||
- repo: https://github.com/executablebooks/mdformat | ||
# Do this before other tools "fixing" the line endings | ||
rev: 0.7.17 | ||
hooks: | ||
- id: mdformat | ||
name: Format Markdown | ||
entry: mdformat # Executable to run, with fixed options | ||
language: python | ||
types: [markdown] | ||
additional_dependencies: | ||
- mdformat-frontmatter | ||
- mdformat-toc | ||
- mdformat-shfmt | ||
- mdformat-tables | ||
- mdformat-config | ||
- mdformat-black | ||
- mdformat-web | ||
- mdformat-gfm | ||
- repo: https://github.com/markdownlint/markdownlint.git | ||
rev: v0.13.0 | ||
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 | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.3.0 | ||
hooks: | ||
- id: codespell | ||
args: [--toml, cndp-codespell.precommit-toml] | ||
additional_dependencies: | ||
- tomli | ||
# exclude: ^dir-1/.*|^dir2/.* |
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,10 @@ | ||
--- | ||
extends: default | ||
rules: | ||
line-length: disable | ||
document-start: disable | ||
comments: | ||
min-spaces-from-content: 1 | ||
ignore: | ||
- builddir/* | ||
- .clang-format |
Oops, something went wrong.