kou commented on code in PR #41888:
URL: https://github.com/apache/arrow/pull/41888#discussion_r1623183018


##########
.github/workflows/dev.yml:
##########
@@ -49,6 +49,10 @@ jobs:
         uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # 
v5.1.0
         with:
           python-version: 3.12
+      - name: Install pre-commit dependencies
+        run: |
+          go install 
github.com/golangci/golangci-lint/cmd/[email protected]
+      - run: echo "PATH=$PATH:/home/runner/go/bin" >> $GITHUB_ENV

Review Comment:
   Can we remove this?
   It seems that `pre-commit run` installs `golangci-lint` automatically.



##########
.pre-commit-config.yaml:
##########
@@ -141,3 +141,20 @@ repos:
           '--disable',
           'dangling-hyphen,line-too-long',
         ]
+  - repo: https://github.com/golangci/golangci-lint
+    rev: v1.59.0
+    hooks:
+      # no built-in support for multiple go.mod
+      # https://github.com/golangci/golangci-lint/issues/828
+      - id: golangci-lint
+        name: golangci-lint-arrow
+        entry: bash -c 'cd go/arrow && golangci-lint run --fix --disable-all 
-E goimports -E gofmt'

Review Comment:
   Can we create a common configuration file instead of specifying 
`--disable*`/`--enable*`?



##########
.pre-commit-config.yaml:
##########
@@ -141,3 +141,20 @@ repos:
           '--disable',
           'dangling-hyphen,line-too-long',
         ]
+  - repo: https://github.com/golangci/golangci-lint
+    rev: v1.59.0
+    hooks:
+      # no built-in support for multiple go.mod
+      # https://github.com/golangci/golangci-lint/issues/828
+      - id: golangci-lint
+        name: golangci-lint-arrow
+        entry: bash -c 'cd go/arrow && golangci-lint run --fix --disable-all 
-E goimports -E gofmt'
+        types_or: [ go ]

Review Comment:
   Can we remove this? It seems that it's the default: 
https://github.com/golangci/golangci-lint/blob/master/.pre-commit-hooks.yaml#L5
   
   ```suggestion
   ```



##########
.pre-commit-config.yaml:
##########
@@ -141,3 +141,20 @@ repos:
           '--disable',
           'dangling-hyphen,line-too-long',
         ]
+  - repo: https://github.com/golangci/golangci-lint
+    rev: v1.59.0
+    hooks:
+      # no built-in support for multiple go.mod
+      # https://github.com/golangci/golangci-lint/issues/828
+      - id: golangci-lint
+        name: golangci-lint-arrow

Review Comment:
   How about using `golangci-lint-full` because `golangci-lint run --fix` is 
the entry used by `golangci-lint-full`?
   
https://github.com/golangci/golangci-lint/blob/master/.pre-commit-hooks.yaml#L12
   
   ```suggestion
         - id: golangci-lint-full
           name: golangci-lint-full-arrow
   ```



-- 
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