Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
01c830c
Add .licenserc.yaml file
artemgavrilov Apr 22, 2024
70b0872
Fix license headers
artemgavrilov Apr 22, 2024
3b124a7
Add github action to check license headers
artemgavrilov Apr 22, 2024
22514ef
Fix workflow
artemgavrilov Apr 22, 2024
bc7781d
Merge remote-tracking branch 'origin/main' into license-headers
artemgavrilov Apr 24, 2024
83d93a6
Fix checkout path
artemgavrilov Apr 24, 2024
bcdc021
Rename workflow
artemgavrilov Apr 24, 2024
f1330b3
Add debug info
artemgavrilov Apr 24, 2024
2e2ead2
Disable workflows
artemgavrilov Apr 24, 2024
025cf6a
Try fix
artemgavrilov Apr 24, 2024
7e325ff
Split check workflow in two jobs
artemgavrilov Apr 25, 2024
6566de7
Merge remote-tracking branch 'origin/main' into license-headers
artemgavrilov Apr 25, 2024
0cc0c88
Try invalid license header
artemgavrilov Apr 25, 2024
f6ed990
Comment of failure
artemgavrilov Apr 25, 2024
10f5537
Disable cppcheck job
artemgavrilov Apr 25, 2024
7efb33e
Fix licenserc file
artemgavrilov Apr 25, 2024
88d46c8
Enable debug logging
artemgavrilov Apr 25, 2024
7f9d690
Prevent comments from licence-eye
artemgavrilov Apr 25, 2024
d1dee75
Revert "Disable cppcheck job"
artemgavrilov Apr 25, 2024
a4ab869
Revert "Disable workflows"
artemgavrilov Apr 25, 2024
ce15fb2
Fix typo
artemgavrilov Apr 25, 2024
4d8993c
Revert "Try invalid license header"
artemgavrilov Apr 25, 2024
dae8523
Update year in license headers
artemgavrilov Apr 25, 2024
c678b00
Cleanup
artemgavrilov Apr 25, 2024
ebc41c2
Fix indention in license header
artemgavrilov Apr 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions .github/workflows/cppcheck.yml → .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,49 @@
name: cppcheck-action-test
name: Checks
on:
pull_request:

jobs:
build:
name: cppcheck-test
cppcheck:
name: Cppcheck
runs-on: ubuntu-22.04
steps:

steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
path: src/pg_stat_monitor

- name: Checkout cppcheck sources
uses: actions/checkout@v4
with:
repository: 'danmar/cppcheck'
ref: '2.13.4'
repository: "danmar/cppcheck"
ref: "2.13.4"
path: src/cppcheck

- name: Build and install cppcheck
working-directory: src/cppcheck
run: |
mkdir build
cd build
cmake ..
cmake --build .
sudo cmake --install .
working-directory: src/cppcheck

- name: Execute linter check with cppcheck
working-directory: src/pg_stat_monitor
run: |
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 .

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
19 changes: 19 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
@@ -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 changes: 4 additions & 4 deletions guc.c
Original file line number Diff line number Diff line change
@@ -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
*
*
* IDENTIFICATION
* contrib/pg_stat_monitor/guc.c
*
Expand Down
6 changes: 3 additions & 3 deletions hash_query.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*-------------------------------------------------------------------------
*
* 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
*
Expand Down
6 changes: 3 additions & 3 deletions pg_stat_monitor.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*-------------------------------------------------------------------------
*
* 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
*
Expand Down
6 changes: 3 additions & 3 deletions pg_stat_monitor.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*-------------------------------------------------------------------------
*
* 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
*
Expand Down