From 2a6564c0a7741ad84d38afae9670db8ca0a0cd4d Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Wed, 19 Jan 2022 14:38:11 -0500 Subject: [PATCH] move all linter config to the root (#9830) This reduces duplication, symlinks, and makes the configurations available by default for the linting tools. --- .flake8 | 5 ++++- .github/linters/.flake8 | 4 ---- .github/linters/.isort.cfg | 20 ------------------ .github/linters/.python-black | 2 -- .github/workflows/super-linter.yml | 8 +++++-- .isort.cfg | 21 ++++++++++++++++++- .../.markdown-lint.yml => .markdown-lint.yml | 0 .github/linters/.python-lint => pylintrc | 0 8 files changed, 30 insertions(+), 30 deletions(-) mode change 120000 => 100644 .flake8 delete mode 100644 .github/linters/.flake8 delete mode 100644 .github/linters/.isort.cfg delete mode 100644 .github/linters/.python-black mode change 120000 => 100644 .isort.cfg rename .github/linters/.markdown-lint.yml => .markdown-lint.yml (100%) rename .github/linters/.python-lint => pylintrc (100%) diff --git a/.flake8 b/.flake8 deleted file mode 120000 index 10cc3cc249ed..000000000000 --- a/.flake8 +++ /dev/null @@ -1 +0,0 @@ -.github/linters/.flake8 \ No newline at end of file diff --git a/.flake8 b/.flake8 new file mode 100644 index 000000000000..ea38e9cb9918 --- /dev/null +++ b/.flake8 @@ -0,0 +1,4 @@ +[flake8] +max-line-length = 120 +exclude = ./typings/**/* +ignore = E203,W503 diff --git a/.github/linters/.flake8 b/.github/linters/.flake8 deleted file mode 100644 index ea38e9cb9918..000000000000 --- a/.github/linters/.flake8 +++ /dev/null @@ -1,4 +0,0 @@ -[flake8] -max-line-length = 120 -exclude = ./typings/**/* -ignore = E203,W503 diff --git a/.github/linters/.isort.cfg b/.github/linters/.isort.cfg deleted file mode 100644 index d21b9f236f1b..000000000000 --- a/.github/linters/.isort.cfg +++ /dev/null @@ -1,20 +0,0 @@ -[settings] -profile= - -; vertical hanging indent mode also used in black configuration -multi_line_output = 3 - -; necessary because black expect the trailing comma -include_trailing_comma = true - -; black compatibility -force_grid_wrap = 0 - -; black compatibility -use_parentheses = True - -; black compatibility -ensure_newline_before_comments = True - -; we chose 120 as line length -line_length = 120 diff --git a/.github/linters/.python-black b/.github/linters/.python-black deleted file mode 100644 index aa709bfe0c2e..000000000000 --- a/.github/linters/.python-black +++ /dev/null @@ -1,2 +0,0 @@ -[tool.black] -line_length = 120 diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index 5fa8e3ed127b..da17d2dd2775 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -55,7 +55,12 @@ jobs: env: VALIDATE_ALL_CODEBASE: true DEFAULT_BRANCH: main - LINTER_RULES_PATH: .github/linters + LINTER_RULES_PATH: . + MARKDOWN_CONFIG_FILE: .markdown-lint.yml + PYTHON_BLACK_CONFIG_FILE: pyproject.toml + PYTHON_FLAKE8_CONFIG_FILE: .flake8 + PYTHON_ISORT_CONFIG_FILE: .isort.cfg + PYTHON_PYLINT_CONFIG_FILE: pylintrc VALIDATE_BASH: true VALIDATE_CSS: true VALIDATE_DOCKER: true @@ -65,7 +70,6 @@ jobs: VALIDATE_JSON: true VALIDATE_MD: true VALIDATE_POWERSHELL: true - VALIDATE_PYTHON: true VALIDATE_PYTHON_PYLINT: true VALIDATE_PYTHON_FLAKE8: true VALIDATE_PYTHON_BLACK: true diff --git a/.isort.cfg b/.isort.cfg deleted file mode 120000 index 00a153712e71..000000000000 --- a/.isort.cfg +++ /dev/null @@ -1 +0,0 @@ -.github/linters/.isort.cfg \ No newline at end of file diff --git a/.isort.cfg b/.isort.cfg new file mode 100644 index 000000000000..d21b9f236f1b --- /dev/null +++ b/.isort.cfg @@ -0,0 +1,20 @@ +[settings] +profile= + +; vertical hanging indent mode also used in black configuration +multi_line_output = 3 + +; necessary because black expect the trailing comma +include_trailing_comma = true + +; black compatibility +force_grid_wrap = 0 + +; black compatibility +use_parentheses = True + +; black compatibility +ensure_newline_before_comments = True + +; we chose 120 as line length +line_length = 120 diff --git a/.github/linters/.markdown-lint.yml b/.markdown-lint.yml similarity index 100% rename from .github/linters/.markdown-lint.yml rename to .markdown-lint.yml diff --git a/.github/linters/.python-lint b/pylintrc similarity index 100% rename from .github/linters/.python-lint rename to pylintrc