Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ DISABLE_LINTERS:
- BASH_EXEC
- BASH_SHFMT
- JSON_PRETTIER
- PYTHON_BLACK
- PYTHON_FLAKE8
- PYTHON_ISORT
- REPOSITORY_DEVSKIM
- REPOSITORY_GRYPE
- REPOSITORY_KICS
- REPOSITORY_SECRETLINT
- REPOSITORY_TRIVY
- YAML_YAMLLINT
- YAML_PRETTIER
- YAML_V8R
DISABLE_ERRORS_LINTERS: # If errors are found by these linters, they will be considered as non blocking.
Expand All @@ -34,5 +36,7 @@ FLAVOR_SUGGESTIONS: false # Don't show suggestions about different MegaLinter fl
PYTHON_ISORT_CONFIG_FILE: pyproject.toml
PYTHON_PYRIGHT_CONFIG_FILE: pyproject.toml
PYTHON_RUFF_CONFIG_FILE: pyproject.toml
CPP_CPPLINT_FILE_EXTENSIONS: [".C", ".c", ".c++", ".cc", ".cl", ".cpp", ".cu", ".cuh", ".cxx", ".cxx.in", ".h", ".h++", ".hh", ".h.in", ".hpp", ".hxx", ".inc", ".inl", ".macro"]
CPP_CLANG_FORMAT_FILE_EXTENSIONS: [".C", ".c", ".c++", ".cc", ".cl", ".cpp", ".cu", ".cuh", ".cxx", ".cxx.in", ".h", ".h++", ".hh", ".h.in", ".hpp", ".hxx", ".inc", ".inl", ".macro"]
CPP_CPPLINT_FILE_EXTENSIONS: [".C", ".c", ".c++", ".cc", ".cl", ".cpp", ".cu", ".cuh", ".cxx", ".cxx.in", ".h", ".h++", ".hh",
".h.in", ".hpp", ".hxx", ".inc", ".inl", ".macro"]
CPP_CLANG_FORMAT_FILE_EXTENSIONS: [".C", ".c", ".c++", ".cc", ".cl", ".cpp", ".cu", ".cuh", ".cxx", ".cxx.in", ".h", ".h++",
".hh", ".h.in", ".hpp", ".hxx", ".inc", ".inl", ".macro"]
34 changes: 34 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
# 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: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.2 # ruff version
hooks:
- id: ruff # linter
args: ["check", "--select", "I", "--fix"]
- id: ruff-format # formatter
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
hooks:
- id: pyupgrade
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
- repo: https://github.com/google/yamlfmt
rev: v0.14.0
hooks:
- id: yamlfmt
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
15 changes: 15 additions & 0 deletions .yamlfmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
# yamlfmt configuration
# Reference: https://github.com/google/yamlfmt/blob/main/docs/config-file.md#configuration-1

formatter:
type: basic
indent: 2
include_document_start: true
line_ending: lf
retain_line_breaks_single: true
max_line_length: 120
drop_merge_tag: true
pad_line_comments: 1
trim_trailing_whitespace: true
eof_newline: true
15 changes: 15 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
# yamllint configuration
# Reference: https://yamllint.readthedocs.io/en/stable/rules.html

extends: default
rules:
line-length:
max: 120
level: warning
indentation:
spaces: 2
level: warning
comments:
require-starting-space: true
min-spaces-from-content: 1