From 6c9666c15f7856dadde041527227887c1cb1c784 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Sat, 11 Aug 2018 22:26:04 -0400 Subject: [PATCH] Add more pre-commit checks Add the following additional checks: - executables have shebang lines - no merge conflict strings - End of files contain empty new line and update files that currently are missing end of file empty lines. Change-Id: I77b1c9629e69753856afa0f15ae0f244be5a2428 Signed-off-by: Thanh Ha --- .pre-commit-config.yaml | 5 ++++- .readthedocs.yml | 1 - docs/_static/commit-hook-curl.example | 2 +- docs/_static/gpg-setup.example | 2 +- docs/_templates/relations.html | 1 - 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ce05348..43f166b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,9 @@ --- repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v1.3.0 + rev: v1.4.0 hooks: + - id: check-executables-have-shebangs + - id: check-merge-conflict + - id: end-of-file-fixer - id: trailing-whitespace diff --git a/.readthedocs.yml b/.readthedocs.yml index 3c8193d..9866633 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -5,4 +5,3 @@ requirements_file: requirements.txt build: image: latest - diff --git a/docs/_static/commit-hook-curl.example b/docs/_static/commit-hook-curl.example index 9daeb6d..f345edd 100644 --- a/docs/_static/commit-hook-curl.example +++ b/docs/_static/commit-hook-curl.example @@ -1 +1 @@ - curl -Lo .git/hooks/commit-msg http://USERNAME@gerrit.linuxfoundation.org/infra/tools/hooks/commit-msg \ No newline at end of file + curl -Lo .git/hooks/commit-msg http://USERNAME@gerrit.linuxfoundation.org/infra/tools/hooks/commit-msg diff --git a/docs/_static/gpg-setup.example b/docs/_static/gpg-setup.example index bc33493..86e6e9b 100644 --- a/docs/_static/gpg-setup.example +++ b/docs/_static/gpg-setup.example @@ -19,4 +19,4 @@ gpg2 --fingerprint gpg2 --send-keys $KEY_ID # in the above example, the $KEY_ID would be F566C9B1 # you should see output like this: -# gpg: sending key F566C9B1 to hkp server keys.gnupg.net \ No newline at end of file +# gpg: sending key F566C9B1 to hkp server keys.gnupg.net diff --git a/docs/_templates/relations.html b/docs/_templates/relations.html index c701ed0..b67946e 100644 --- a/docs/_templates/relations.html +++ b/docs/_templates/relations.html @@ -13,4 +13,3 @@ {% endif %} - -- 2.16.6