Got pre-commit to check for correct copyright year
This commit is contained in:
parent
53a185083c
commit
ea6ebd0226
@ -15,7 +15,9 @@ repos:
|
|||||||
- id: detect-private-key
|
- id: detect-private-key
|
||||||
exclude: testdata
|
exclude: testdata
|
||||||
- id: mixed-line-ending
|
- id: mixed-line-ending
|
||||||
- repo: .
|
- repo: local
|
||||||
rev: main
|
|
||||||
hooks:
|
hooks:
|
||||||
- id: validate-copyright-year
|
- id: validate-copyright-year
|
||||||
|
name: Validate copyright year
|
||||||
|
entry: hack/check-copyright-year.sh
|
||||||
|
language: script
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2021 the Pinniped contributors. All Rights Reserved.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
# Check if copyright statements include the current year
|
# Check if copyright statements include the current year
|
||||||
#
|
#
|
||||||
@ -16,6 +20,6 @@ if [ -n "$missing_copyright_files" ]; then
|
|||||||
echo "$year is missing in the copyright notice of the following files:"
|
echo "$year is missing in the copyright notice of the following files:"
|
||||||
for f in $missing_copyright_files; do
|
for f in $missing_copyright_files; do
|
||||||
echo " $f"
|
echo " $f"
|
||||||
done
|
done
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2020 the Pinniped contributors. All Rights Reserved.
|
// Copyright 2020-2021 the Pinniped contributors. All Rights Reserved.
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
package generator
|
package generator
|
||||||
@ -25,7 +25,6 @@ import (
|
|||||||
"go.pinniped.dev/internal/testutil"
|
"go.pinniped.dev/internal/testutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// this is a comment
|
|
||||||
var (
|
var (
|
||||||
owner = &appsv1.Deployment{
|
owner = &appsv1.Deployment{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
|
Loading…
Reference in New Issue
Block a user