Fix robot file format issues
[integration/test.git] / .pre-commit-config.yaml
index b726c5a88169e47599bc45f210ad901fd95a7410..9a9496d07094d6c8b7fab22a5673b10c5053deb1 100644 (file)
@@ -1,20 +1,42 @@
 ---
-- repo: git://github.com/guykisel/pre-commit-robotframework-tidy
-  rev: 'master'
-  hooks:
-  - id: robotframework-tidy-wrapper
-    additional_dependencies: ['robotframework==3.1.1']  # Pin due to tidy warning in 3.1.2
+repos:
+  - repo: https://github.com/pre-commit/pre-commit-hooks
+    rev: v4.1.0  # Use the ref you want to point at
+    hooks:
+      - id: trailing-whitespace
+        # this hook will remove any blank lines at the end of a file, whereas the robot hook will add one
+        # so to prevent this conflict we will ignore .robot files in this trailing-whitespace hook
+        exclude: '\.robot'
 
-- repo: https://github.com/jorisroovers/gitlint
-  rev: v0.11.0
-  hooks:
-  - id: gitlint
+  - repo: https://github.com/PyCQA/flake8
+    rev: 6.1.0
+    hooks:
+      - id: flake8
 
-- repo: local
-  hooks:
-    - id: rstcheck
-      name: rstcheck
-      entry: rstcheck
-      files: '\.rst'
-      language: python
-      additional_dependencies: [rstcheck, sphinx]
+  - repo: https://github.com/psf/black
+    rev: 22.8.0
+    hooks:
+      - id: black
+
+  - repo: https://github.com/MarketSquare/robotframework-tidy
+    rev: 3.2.0
+    hooks:
+      - id: robotidy
+        additional_dependencies: ['robotframework==6.1.1']
+
+  - repo: https://github.com/jorisroovers/gitlint
+    rev: v0.19.1
+    hooks:
+      - id: gitlint
+        stages: [commit-msg]
+      - id: gitlint-ci
+        stages: [manual]
+
+  - repo: local
+    hooks:
+      - id: rstcheck
+        name: rstcheck
+        entry: rstcheck
+        files: '\.rst'
+        language: python
+        additional_dependencies: [rstcheck, sphinx]