Skip to content

Commit

Permalink
Add license header lint rules (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
henrybear327 authored Nov 11, 2024
1 parent 298036d commit 11c4c5f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tools/.golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,22 @@ linters-settings:
- name: error-strings
severity: error
disabled: false
# https://golangci-lint.run/usage/linters/#goheader
goheader:
values:
regexp:
AUTHOR: ^Copyright 2024 (The Kubernetes authors|Swisscom \(Schweiz\) AG)\.
template: |-
{{ AUTHOR }}
Licensed 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.

0 comments on commit 11c4c5f

Please sign in to comment.