Skip to content

Commit 86ae1fe

Browse files
authored
Standardize and auto add license headers for SQL files with pre-commit (apache#12071)
1 parent ac3b180 commit 86ae1fe

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@ repos:
6262
- .github/workflows/license-templates/LICENSE.txt
6363
- --fuzzy-match-generates-todo
6464
exclude: ^(CHANGES|ISSUE_TEMPLATE|PULL_REQUEST_TEMPLATE)\.md$|^ui/docs/(full|smoke)-test-plan\.template\.md$
65+
- id: insert-license
66+
name: add license for all SQL files
67+
files: \.sql$
68+
args:
69+
- --comment-style
70+
- '|--|'
71+
- --license-filepath
72+
- .github/workflows/license-templates/LICENSE.txt
73+
- --fuzzy-match-generates-todo
6574
- repo: https://github.com/pre-commit/pre-commit-hooks
6675
rev: v6.0.0
6776
hooks:

engine/schema/src/main/resources/META-INF/db/schema-307to410.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
-- distributed with this work for additional information
44
-- regarding copyright ownership. The ASF licenses this file
55
-- to you under the Apache License, Version 2.0 (the
6-
-- "License"); you may not use this file except in compliances
6+
-- "License"); you may not use this file except in compliance
77
-- with the License. You may obtain a copy of the License at
88
--
99
-- http://www.apache.org/licenses/LICENSE-2.0

0 commit comments

Comments
 (0)