From fda98b57937f576d0ddfd6711476b0b36d401147 Mon Sep 17 00:00:00 2001 From: Chris Nesbitt-Smith Date: Tue, 17 Oct 2023 16:42:23 +0100 Subject: [PATCH] linting --- .editorconfig | 9 +++++++++ .github/workflows/linter.yaml | 15 +++++++++++++++ .markdownlint.yaml | 6 ++++++ .pre-commit-config.yaml | 9 +++++++++ 4 files changed, 39 insertions(+) create mode 100644 .editorconfig create mode 100644 .github/workflows/linter.yaml create mode 100644 .markdownlint.yaml create mode 100644 .pre-commit-config.yaml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..a1b98487d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +end_of_line = lf +indent_style = space +indent_size = 2 +insert_final_newline = true +max_line_length = 120 +trim_trailing_whitespace = true \ No newline at end of file diff --git a/.github/workflows/linter.yaml b/.github/workflows/linter.yaml new file mode 100644 index 000000000..9d46fb96f --- /dev/null +++ b/.github/workflows/linter.yaml @@ -0,0 +1,15 @@ +name: Linter + +on: + pull_request: + push: + branches: [main] +jobs: + main: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.x + - uses: pre-commit/action@v3.0.0 diff --git a/.markdownlint.yaml b/.markdownlint.yaml new file mode 100644 index 000000000..d5dc17298 --- /dev/null +++ b/.markdownlint.yaml @@ -0,0 +1,6 @@ +default: true +MD013: false +no-hard-tabs: false +whitespace: false +MD024: false +MD025: false diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..07d04e449 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,9 @@ +repos: + - repo: https://github.com/igorshubovych/markdownlint-cli + rev: v0.37.0 + hooks: + - id: markdownlint-fix + - repo: https://github.com/google/yamlfmt + rev: v0.10.0 + hooks: + - id: yamlfmt \ No newline at end of file