Skip to content

Commit 73a3963

Browse files
committed
Modify linter configuration for copyright header validation
1 parent 8a88aaf commit 73a3963

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

agent-manager-service/.github/linters/.golangci.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ linters:
3939
- github.com/wso2-enterprise/agent-manager-service/spec\.PostgresQueryStats
4040
goheader:
4141
template-path: .github/copyright_header.tmpl
42+
values:
43+
regexp:
44+
YEAR: "\\d{4}"
4245
exclusions:
4346
generated: lax
4447
rules:
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
goimports -w .
22
golangci-lint --version
3-
golangci-lint run ./... -v -c .github/linters/.golangci.yaml --fix
3+
# Run all linters with --fix except goheader (to prevent modifying existing copyright years)
4+
golangci-lint run ./... -v -c .github/linters/.golangci.yaml --fix --disable goheader
5+
# Run goheader separately without --fix to only verify headers exist without modifying them
6+
golangci-lint run ./... -v -c .github/linters/.golangci.yaml --enable-only goheader

0 commit comments

Comments
 (0)