Skip to content

Commit

Permalink
CI: add license pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
andresailer committed Aug 22, 2023
1 parent 99d036b commit 24404fc
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/templates/apache-2.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Copyright (c) ${years} ${owner}.

This file is part of ${projectname}.
See ${projecturl} for further info.

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.
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,14 @@ repos:
entry: .github/scripts/clang-format-hook
types: [c++]
language: system
- repo: https://github.com/johann-petrak/licenseheaders.git
rev: 'v0.8.8'
hooks:
- id: licenseheaders
args: ["-t", ".github/templates/apache-2.tmpl", "-y2014-2023",
"-o", "Key4hep-Project",
"-n", "Key4hep",
"-u", "https://key4hep.github.io/key4hep-doc/",
"-x", ".github/*", ".pre-commit-config.yaml", "README.md",
"doc/ReleaseNotes.md", ".k4fwcore-ci.d/*", "init.sh",
"-f"]

0 comments on commit 24404fc

Please sign in to comment.