mmodzelewski commented on code in PR #2676:
URL: https://github.com/apache/iggy/pull/2676#discussion_r2763035410


##########
.pre-commit-config.yaml:
##########
@@ -146,9 +156,51 @@ repos:
         pass_filenames: false
         stages: [pre-push]
 
-        # TODO(hubcio): add fast checks, linters, formatters for other 
languages
-        # - python (maturin, pytest, ruff, black)
-        # - java
-        # - go
-        # - csharp
-        # - js
+  # Go SDK formatting
+  - repo: local
+    hooks:
+      - id: go-fmt
+        name: go fmt
+        entry: bash -c 'cd foreign/go && gofmt -w -s .'
+        language: system
+        files: ^foreign/go/.*\.go$
+        pass_filenames: false
+
+      - id: go-mod-tidy
+        name: go mod tidy
+        entry: bash -c 'cd foreign/go && go mod tidy && git diff --exit-code 
go.mod go.sum'
+        language: system
+        files: ^foreign/go/(.*\.go|go\.mod|go\.sum)$
+        pass_filenames: false
+
+  # Node.js SDK linting
+  - repo: local
+    hooks:
+      - id: node-eslint
+        name: node eslint
+        entry: bash -c 'cd foreign/node && npm run lint'
+        language: system
+        files: ^foreign/node/src/.*\.ts$
+        pass_filenames: false
+
+  # Java SDK linting (Checkstyle + Spotless via Gradle)
+  - repo: local
+    hooks:
+      - id: java-gradle-check
+        name: java gradle check
+        entry: bash -c 'cd foreign/java && ./gradlew check -x test'
+        language: system
+        files: ^foreign/java/.*\.(java|kt|kts)$

Review Comment:
   can we add entries for `bdd/java` and `examples/java` as well?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to