jbampton commented on a change in pull request #3624:
URL: https://github.com/apache/apisix/pull/3624#discussion_r627083105



##########
File path: .pre-commit-config.yaml
##########
@@ -0,0 +1,193 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+---
+default_stages: [commit, push]
+default_language_version:
+  # force all unspecified Python hooks to run python3
+  python: python3
+minimum_pre_commit_version: "1.20.0"
+repos:
+  - repo: meta
+    hooks:
+      - id: identity
+      - id: check-hooks-apply
+  - repo: https://github.com/Lucas-C/pre-commit-hooks
+    rev: v1.1.10
+    hooks:
+      # - id: insert-license
+      #  name: Add license for all Golang files
+      #  exclude: ^\.github/.*$
+      #  files: \.go
+      #  args:
+      #    - --comment-style
+      #    - "/*|| */"
+      #    - --license-filepath
+      #    - license-templates/LICENSE.txt
+      #    - --fuzzy-match-generates-todo
+      # - id: insert-license
+      #  name: Add license for all Java files
+      #  exclude: ^\.github/.*$
+      #  files: \.java$
+      #  args:
+      #    - --comment-style
+      #    - "/*|| */"
+      #    - --license-filepath
+      #    - license-templates/LICENSE.txt
+      #    - --fuzzy-match-generates-todo
+      - id: insert-license

Review comment:
       We are not using bots.   I am just using it exactly like Apache Airflow 
and it's allowed.  
   
   When run `pre-commit` on the CI the license check would just fail if there 
was a missing license and the `pre-commit` GitHub Action would fail.   When run 
locally if the license check fails then `pre-commit` would auto insert the 
missing license.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to