From 176081740670afce6685d49038d393f8124dbcb5 Mon Sep 17 00:00:00 2001 From: Saurav Maheshkar Date: Tue, 28 Feb 2023 09:09:44 +0000 Subject: [PATCH] chore: move `yamllint` config to pre-commit config (#205) @rusty1s This PR aims to further improve the overall structure of the repository by moving the yamllint configuration within the `pre-commit-config.yaml` file. The only snippet in which the `.yamllint.yml` file was being used was the pre-commit config file. yamllint [allows to have a custom configuration without a config file](https://yamllint.readthedocs.io/en/stable/configuration.html#custom-configuration-without-a-config-file) by using the `-d` flag. Using this feature, we add a serialized version of the config in the args parameter of the pre-commit config. Similar to https://github.com/pyg-team/pytorch_geometric/pull/6776 --- .pre-commit-config.yaml | 3 ++- .yamllint.yml | 9 --------- 2 files changed, 2 insertions(+), 10 deletions(-) delete mode 100644 .yamllint.yml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 57d23cc7b..d0bc3850a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,8 @@ repos: rev: v1.29.0 hooks: - id: yamllint - args: [-c=.yamllint.yml] + name: Lint yaml + args: [-d, '{extends: default, rules: {line-length: disable, document-start: disable, truthy: {level: error}, braces: {max-spaces-inside: 1}}}'] - repo: https://github.com/regebro/pyroma rev: "4.2" diff --git a/.yamllint.yml b/.yamllint.yml deleted file mode 100644 index 615b1a885..000000000 --- a/.yamllint.yml +++ /dev/null @@ -1,9 +0,0 @@ -extends: default - -rules: - line-length: disable - document-start: disable - truthy: - level: error - braces: - max-spaces-inside: 1