Add more pre-commit checks 11/12211/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Sun, 12 Aug 2018 02:26:04 +0000 (22:26 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Sun, 12 Aug 2018 02:26:13 +0000 (22:26 -0400)
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 <thanh.ha@linuxfoundation.org>
.pre-commit-config.yaml
.readthedocs.yml
docs/_static/commit-hook-curl.example
docs/_static/gpg-setup.example
docs/_templates/relations.html

index ce05348..43f166b 100644 (file)
@@ -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
index 3c8193d..9866633 100644 (file)
@@ -5,4 +5,3 @@ requirements_file: requirements.txt
 
 build:
    image: latest
-
index 9daeb6d..f345edd 100644 (file)
@@ -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
index bc33493..86e6e9b 100644 (file)
@@ -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
index c701ed0..b67946e 100644 (file)
@@ -13,4 +13,3 @@
     {% endif %}
 </div>
 </center>
-