Add license headers validation (#458)
* Add .licenserc.yaml file * Fix license headers * Add github action to check license headers * Fix workflow * Fix checkout path * Rename workflow * Add debug info * Disable workflows * Try fix * Split check workflow in two jobs * Try invalid license header * Comment of failure * Disable cppcheck job * Fix licenserc file * Enable debug logging * Prevent comments from licence-eye * Revert "Disable cppcheck job" This reverts commitpull/464/head10f55373ea
. * Revert "Disable workflows" This reverts commit2e2ead2fa5
. * Fix typo * Revert "Try invalid license header" This reverts commit0cc0c883d2
. * Update year in license headers * Cleanup * Fix indention in license header
parent
61256faf83
commit
288ec6325f
|
@ -1,34 +1,49 @@
|
||||||
name: cppcheck-action-test
|
name: Checks
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
cppcheck:
|
||||||
name: cppcheck-test
|
name: Cppcheck
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
|
||||||
|
|
||||||
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: src/pg_stat_monitor
|
||||||
|
|
||||||
- name: Checkout cppcheck sources
|
- name: Checkout cppcheck sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: 'danmar/cppcheck'
|
repository: "danmar/cppcheck"
|
||||||
ref: '2.13.4'
|
ref: "2.13.4"
|
||||||
path: src/cppcheck
|
path: src/cppcheck
|
||||||
|
|
||||||
- name: Build and install cppcheck
|
- name: Build and install cppcheck
|
||||||
|
working-directory: src/cppcheck
|
||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake ..
|
cmake ..
|
||||||
cmake --build .
|
cmake --build .
|
||||||
sudo cmake --install .
|
sudo cmake --install .
|
||||||
working-directory: src/cppcheck
|
|
||||||
|
|
||||||
- name: Execute linter check with cppcheck
|
- name: Execute linter check with cppcheck
|
||||||
|
working-directory: src/pg_stat_monitor
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
cppcheck --enable=all --inline-suppr --template='{file}:{line},{severity},{id},{message}' --error-exitcode=1 --suppress=missingIncludeSystem --suppress=missingInclude --suppress=unmatchedSuppression:pg_stat_monitor.c --check-config .
|
cppcheck --enable=all --inline-suppr --template='{file}:{line},{severity},{id},{message}' --error-exitcode=1 --suppress=missingIncludeSystem --suppress=missingInclude --suppress=unmatchedSuppression:pg_stat_monitor.c --check-config .
|
||||||
|
|
||||||
|
license:
|
||||||
|
name: License
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Check license headers
|
||||||
|
uses: apache/skywalking-eyes/header@v0.6.0
|
||||||
|
with:
|
||||||
|
token: "" # Prevent comments
|
|
@ -0,0 +1,19 @@
|
||||||
|
header:
|
||||||
|
paths:
|
||||||
|
- "**/*.c"
|
||||||
|
- "**/*.h"
|
||||||
|
license:
|
||||||
|
pattern: |
|
||||||
|
.*\.(c|h)
|
||||||
|
.*
|
||||||
|
|
||||||
|
Portions Copyright © 2018-2024, Percona LLC and/or its affiliates
|
||||||
|
|
||||||
|
Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
|
||||||
|
|
||||||
|
Portions Copyright (c) 1994, The Regents of the University of California
|
||||||
|
|
||||||
|
IDENTIFICATION
|
||||||
|
contrib/pg_stat_monitor/.*\.(c|h)
|
||||||
|
|
||||||
|
comment: never
|
8
guc.c
8
guc.c
|
@ -1,14 +1,14 @@
|
||||||
/*-------------------------------------------------------------------------
|
/*-------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* guc.c: guc variable handling of pg_stat_monitor
|
* guc.c
|
||||||
|
* guc variable handling of pg_stat_monitor
|
||||||
*
|
*
|
||||||
* Portions Copyright © 2018-2020, Percona LLC and/or its affiliates
|
* Portions Copyright © 2018-2024, Percona LLC and/or its affiliates
|
||||||
*
|
*
|
||||||
* Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* Portions Copyright (c) 1994, The Regents of the University of California
|
* Portions Copyright (c) 1994, The Regents of the University of California
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* contrib/pg_stat_monitor/guc.c
|
* contrib/pg_stat_monitor/guc.c
|
||||||
*
|
*
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
* hash_query.c
|
* hash_query.c
|
||||||
* Track statement execution times across a whole database cluster.
|
* Track statement execution times across a whole database cluster.
|
||||||
*
|
*
|
||||||
* Portions Copyright © 2018-2020, Percona LLC and/or its affiliates
|
* Portions Copyright © 2018-2024, Percona LLC and/or its affiliates
|
||||||
*
|
*
|
||||||
* Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* Portions Copyright (c) 1994, The Regents of the University of California
|
* Portions Copyright (c) 1994, The Regents of the University of California
|
||||||
*
|
*
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
* pg_stat_monitor.c
|
* pg_stat_monitor.c
|
||||||
* Track statement execution times across a whole database cluster.
|
* Track statement execution times across a whole database cluster.
|
||||||
*
|
*
|
||||||
* Portions Copyright © 2018-2020, Percona LLC and/or its affiliates
|
* Portions Copyright © 2018-2024, Percona LLC and/or its affiliates
|
||||||
*
|
*
|
||||||
* Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* Portions Copyright (c) 1994, The Regents of the University of California
|
* Portions Copyright (c) 1994, The Regents of the University of California
|
||||||
*
|
*
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
* pg_stat_monitor.h
|
* pg_stat_monitor.h
|
||||||
* Track statement execution times across a whole database cluster.
|
* Track statement execution times across a whole database cluster.
|
||||||
*
|
*
|
||||||
* Portions Copyright © 2018-2020, Percona LLC and/or its affiliates
|
* Portions Copyright © 2018-2024, Percona LLC and/or its affiliates
|
||||||
*
|
*
|
||||||
* Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* Portions Copyright (c) 1994, The Regents of the University of California
|
* Portions Copyright (c) 1994, The Regents of the University of California
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue