diff --git a/.clang-format b/.clang-format index b4abfa0..d65f1ce 100644 --- a/.clang-format +++ b/.clang-format @@ -1,7 +1,6 @@ --- BasedOnStyle: Google IndentWidth: 4 ---- Language: Cpp ColumnLimit: 100 PointerAlignment: Right @@ -12,7 +11,6 @@ SortIncludes: false SpaceAfterCStyleCast: true AllowShortCaseLabelsOnASingleLine: false AllowAllArgumentsOnNextLine: false -AllowAllParametersOfDeclarationOnNextLine: false AllowShortBlocksOnASingleLine: Never AllowShortFunctionsOnASingleLine: None BinPackArguments: false diff --git a/.mdl.rb b/.mdl.rb new file mode 100644 index 0000000..0b971f6 --- /dev/null +++ b/.mdl.rb @@ -0,0 +1,11 @@ +# Style file for mdl +# https://github.com/markdownlint/markdownlint/blob/main/docs/creating_styles.md + +# Include all rules +all + +# Disable specific rules +#exclude_rule 'MD012' + +# Update rules configuration +rule 'MD013', :line_length => 120 diff --git a/.mdlrc b/.mdlrc new file mode 100644 index 0000000..dd25d91 --- /dev/null +++ b/.mdlrc @@ -0,0 +1,14 @@ +# markdownlint config file + +# Use custom style file +style "#{File.dirname(__FILE__)}/.mdl.rb" + +# MD002 - First header in file should be a top level header +# MD005 - Inconsistent indentation for list items at the same level +# MD007 - Unordered list indentation +# MD014 - Dollar signs used before commands without showing output +# MD024 - Multiple headers with the same content +# MD029 - Ordered list item prefix +# MD033 - Inline HTML +# MD041 - First line in file should be a top level header +rules "~MD002,~MD005,~MD007,~MD014,~MD024,~MD029,~MD033,~MD041" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..06afa81 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,47 @@ +# To install hooks, run: +# pre-commit install --hook-type pre-commit +# pre-commit install --hook-type commit-msg + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: mixed-line-ending + - id: check-added-large-files + - id: check-merge-conflict + - id: check-case-conflict + + - repo: https://github.com/codespell-project/codespell + rev: v2.2.6 + hooks: + - id: codespell + args: ['--ignore-words-list', 'ontop,shft,hte', '--skip', 'makefile_conf/chain/*,tests/ragger/eip712_input_files/*'] + + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v12.0.1 + hooks: + - id: clang-format + types_or: [c] + + - repo: https://github.com/Mateusz-Grzelinski/actionlint-py + rev: v1.6.27.13 + hooks: + - id: actionlint + types_or: [yaml] + args: [-shellcheck='' -pyflakes=''] + + - repo: https://github.com/markdownlint/markdownlint + rev: v0.12.0 + hooks: + - id: markdownlint + types_or: [markdown] + + - repo: https://github.com/PyCQA/pylint + rev: v2.16.2 + hooks: + - id: pylint + types: [python] + args: ['--jobs=0', '--rcfile=tests/ragger/setup.cfg'] + files: '^tests/ragger/.*$'