-
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
acd4d78
commit f355d08
Showing
131 changed files
with
1,361 additions
and
1,193 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,23 @@ | ||
name: clang-format | ||
|
||
on: | ||
on: # yamllint disable-line rule:truthy | ||
pull_request: | ||
branches: [ main ] | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
path: | ||
- check: 'examples/vpp' | ||
exclude: '(cli|cndp|device|format|input|output)' # Exclude file paths containing "hello" or "world" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DoozyX/[email protected] | ||
- name: Run clang-format style check. | ||
uses: jidicula/[email protected] | ||
with: | ||
source: '.' | ||
exclude: './examples/vpp-plugin' | ||
extensions: 'c,h,cc,cpp' | ||
clangFormatVersion: 15.0.2 | ||
clang-format-version: '18' | ||
check-path: '.' | ||
exclude-regex: ${{ matrix.path['exclude'] }} |
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,58 @@ | ||
# 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: v18.1.6 | ||
hooks: | ||
- 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/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: ^doc/api/doxy-api-index.md |
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.