Skip to content

Commit

Permalink
common: run pre-commit for the first time for all files
Browse files Browse the repository at this point in the history
Excluded files that should not be touched by pre-commit:
- Valgrind headers from trailing-whitespace
- files for checksum tests from end-of-file-fixer
- pool32.set from trailing-whitespace check
- unicodetest files from trailing-whitespace check

Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
  • Loading branch information
grom72 committed Oct 4, 2024
1 parent 872ac3c commit c82ee55
Show file tree
Hide file tree
Showing 36 changed files with 72 additions and 86 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker_rebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
steps:
- name: Clone the git repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Rebuild the image
env:
OS: ${{ matrix.OS }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pmem_ras.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# utils/gha-runners/run-ras-linux.yml
name: PMEM RAS

on:
on:
workflow_dispatch:
schedule:
# run this job every 8 hours
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pmem_test_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This workflow is run on 'self-hosted' runners.
name: PMEM test matrix

on:
on:
workflow_call:
inputs:
force_enable:
Expand Down
10 changes: 9 additions & 1 deletion .pre-commit-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,18 @@ repos:
hooks:
- id: trailing-whitespace
exclude: |
(?x)(\.match$)
(?x)(\.match$|
src/test/unicode_match_script/unicodetest|
src/test/util_poolset_parse/pool32.set|
src/core/valgrind/drd.h|
src/core/valgrind/helgrind.h|
src/core/valgrind/memcheck.h|
src/core/valgrind/valgrind.h)
- id: end-of-file-fixer
exclude: |
(?x)(\.match$|
src/core/valgrind/memcheck.h|
src/test/checksum/file[0-9]|
^GIT_VERSION$)
- id: check-yaml
- id: check-added-large-files
1 change: 0 additions & 1 deletion src/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ BraceWrapping:
BeforeElse: false
IndentBraces: false
AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false
AlwaysBreakAfterDefinitionReturnType: true
SpaceBeforeParens: ControlStatements
SpacesBeforeTrailingComments: 1
Expand Down
1 change: 0 additions & 1 deletion src/benchmarks/README
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ package.

rpm-based systems : glibX-devel (where X is the API/ABI version)
dpkg-based systems: libglibX-dev (where X is the API/ABI version)

1 change: 0 additions & 1 deletion src/core/pmemcore.inc
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ SOURCE +=\
$(CORE)/last_error_msg.c\
$(CORE)/log.c \
$(CORE)/log_default.c

3 changes: 1 addition & 2 deletions src/examples/libpmem2/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2020-2021, Intel Corporation
# Copyright 2019-2024, Intel Corporation

#
# examples/libpmem2/Makefile -- build the libpmem2 examples
Expand All @@ -8,4 +8,3 @@
DIRS = advanced basic log redo map_multiple_files unsafe_shutdown ringbuf

include ../Makefile.inc

1 change: 0 additions & 1 deletion src/examples/libpmemobj/pminvaders/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
pminvaders
pminvaders2

1 change: 0 additions & 1 deletion src/examples/libpmemobj/slab_allocator/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
main
libslab_allocator.so

3 changes: 1 addition & 2 deletions src/examples/libpmemobj/string_store_tx_type/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2015-2016, Intel Corporation
# Copyright 2015-2024, Intel Corporation

#
# examples/libpmemobj/string_store_tx/Makefile -- build the intro 3 example
Expand All @@ -12,4 +12,3 @@ include ../../Makefile.inc

writer: writer.o
reader: reader.o

3 changes: 1 addition & 2 deletions src/test/ex_libpmem/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2015-2016, Intel Corporation
# Copyright 2015-2024, Intel Corporation

#
# src/test/ex_libpmem/Makefile -- build ex_libpmem unittest
Expand All @@ -12,4 +12,3 @@ include ../Makefile.inc

EXAMPLES=$(EX_LIBPMEM)/simple_copy \
$(EX_LIBPMEM)/full_copy

3 changes: 1 addition & 2 deletions src/test/libpmempool_backup/config.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2017, Intel Corporation
# Copyright 2017-2024, Intel Corporation
#
#
# libpmempool_backup/config.sh -- test configuration
Expand All @@ -10,4 +10,3 @@
# when run on a non-pmem file system.

CONF_TIMEOUT[0]='10m'

3 changes: 1 addition & 2 deletions src/test/obj_basic_integration/config.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2017, Intel Corporation
# Copyright 2017-2024, Intel Corporation
#
#
# obj_basic_integration/config.sh -- test configuration
Expand All @@ -10,4 +10,3 @@
# when run on a non-pmem file system.

CONF_GLOBAL_TIMEOUT='10m'

3 changes: 1 addition & 2 deletions src/test/obj_check/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2015-2019, Intel Corporation
# Copyright 2015-2024, Intel Corporation

#
# src/test/obj_check/Makefile -- build obj_check test
Expand All @@ -13,4 +13,3 @@ USE_PMEMWRITE=y
USE_PMEMALLOC=y

include ../Makefile.inc

3 changes: 1 addition & 2 deletions src/test/obj_include/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2016-2019, Intel Corporation
# Copyright 2016-2024, Intel Corporation

#
# src/test/obj_include/Makefile -- build include tests
Expand All @@ -14,4 +14,3 @@ OBJS = obj_atomic_base_include.o obj_atomic_include.o \
LIBPMEMOBJ=y

include ../Makefile.inc

3 changes: 1 addition & 2 deletions src/test/obj_list/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2015-2019, Intel Corporation
# Copyright 2015-2024, Intel Corporation

#
# src/test/obj_list/Makefile -- build obj_list test
Expand All @@ -17,4 +17,3 @@ CFLAGS += -g -DDEBUG
LDFLAGS += $(call extract_funcs, obj_list.c)
LDFLAGS += $(call extract_funcs, obj_list_mocks.c)
LDFLAGS += $(call extract_funcs, obj_list_mocks_palloc.c)

3 changes: 1 addition & 2 deletions src/test/obj_memcheck/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2015-2019, Intel Corporation
# Copyright 2015-2024, Intel Corporation

#
# src/test/obj_memcheck/Makefile -- build obj_memcheck unit test
Expand All @@ -10,4 +10,3 @@ OBJS = obj_memcheck.o
LIBPMEMOBJ=y

include ../Makefile.inc

3 changes: 1 addition & 2 deletions src/test/obj_memcheck_register/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018-2019, Intel Corporation
# Copyright 2018-2024, Intel Corporation

#
# src/test/obj_memcheck_register/Makefile -- build obj_memcheck_register test
Expand All @@ -10,4 +10,3 @@ OBJS = obj_memcheck_register.o
LIBPMEMOBJ=y

include ../Makefile.inc

3 changes: 1 addition & 2 deletions src/test/obj_persist_count/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2015-2019, Intel Corporation
# Copyright 2015-2024, Intel Corporation

#
# src/test/obj_persist_count/Makefile -- build obj_persist_count unit test
Expand All @@ -15,4 +15,3 @@ BUILD_STATIC_NONDEBUG=n
include ../Makefile.inc

LDFLAGS += $(call extract_funcs, obj_persist_count.c)

3 changes: 1 addition & 2 deletions src/test/obj_pmemcheck/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018-2019, Intel Corporation
# Copyright 2018-2024, Intel Corporation

#
# src/test/obj_pmemcheck/Makefile -- build obj_pmemcheck unit test
Expand All @@ -10,4 +10,3 @@ OBJS = obj_pmemcheck.o
LIBPMEMOBJ=internal-debug

include ../Makefile.inc

1 change: 0 additions & 1 deletion src/test/obj_toid/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
obj_toid

3 changes: 1 addition & 2 deletions src/test/obj_tx_add_range/config.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2017, Intel Corporation
# Copyright 2017-2024, Intel Corporation
#
#
# obj_tx_add_range/config.sh -- test configuration
Expand All @@ -10,4 +10,3 @@
# when run on a non-pmem file system.

CONF_GLOBAL_TIMEOUT='10m'

3 changes: 1 addition & 2 deletions src/test/obj_tx_mt/config.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2017, Intel Corporation
# Copyright 2017-2024, Intel Corporation
#
#
# obj_tx_mt/config.sh -- test configuration
Expand All @@ -10,4 +10,3 @@
# when run on a non-pmem file system.

CONF_GLOBAL_TIMEOUT='10m'

3 changes: 1 addition & 2 deletions src/test/pmempool_check/config.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2017, Intel Corporation
# Copyright 2017-2024, Intel Corporation
#
#
# pmempool_check/config.sh -- test configuration
Expand All @@ -10,4 +10,3 @@
# when run on a non-pmem file system.

CONF_TIMEOUT[5]='10m'

10 changes: 5 additions & 5 deletions src/test/util_map_proc/maps_align_freebsd
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
00400000 0041c000 r-xp 00000000 fd:01 1310785 /some/path/testfile
0061b000 0061c000 rw-p 0001b000 fd:01 1310785 /some/path/testfile
0061c000 0061d000 rw-p 00000000 00:00 0
0061c000 0061d000 rw-p 00000000 00:00 0
0081c000 0081d000 rw-p 0001c000 fd:01 1310785 /some/path/testfile
02699000 026ba000 rw-p 00000000 00:00 0 [heap]
32b5000000 32b5020000 r-xp 00000000 fd:01 917587 /lib64/ld-2.12.so
32b521f000 32b5220000 r--p 0001f000 fd:01 917587 /lib64/ld-2.12.so
32b5220000 32b5221000 rw-p 00020000 fd:01 917587 /lib64/ld-2.12.so
32b5221000 32b5222000 rw-p 00000000 00:00 0
32b5221000 32b5222000 rw-p 00000000 00:00 0
32b5400000 32b558b000 r-xp 00000000 fd:01 917588 /lib64/libc-2.12.so
32b558b000 32b578a000 ---p 0018b000 fd:01 917588 /lib64/libc-2.12.so
32b578a000 32b578e000 r--p 0018a000 fd:01 917588 /lib64/libc-2.12.so
32b578e000 32b578f000 rw-p 0018e000 fd:01 917588 /lib64/libc-2.12.so
32b578f000 32b5794000 rw-p 00000000 00:00 0
32b578f000 32b5794000 rw-p 00000000 00:00 0
32b5c00000 32b5c02000 r-xp 00000000 fd:01 917594 /lib64/libdl-2.12.so
32b5c02000 32b5e02000 ---p 00002000 fd:01 917594 /lib64/libdl-2.12.so
32b5e02000 32b5e03000 r--p 00002000 fd:01 917594 /lib64/libdl-2.12.so
Expand All @@ -20,7 +20,7 @@
32b6017000 32b6217000 ---p 00017000 fd:01 917592 /lib64/libpthread-2.12.so
32b6217000 32b6218000 r--p 00017000 fd:01 917592 /lib64/libpthread-2.12.so
32b6218000 32b6219000 rw-p 00018000 fd:01 917592 /lib64/libpthread-2.12.so
32b6219000 32b621d000 rw-p 00000000 00:00 0
32b6219000 32b621d000 rw-p 00000000 00:00 0
32b6800000 32b6807000 r-xp 00000000 fd:01 917631 /lib64/librt-2.12.so
32b6807000 32b6a06000 ---p 00007000 fd:01 917631 /lib64/librt-2.12.so
32b6a06000 32b6a07000 r--p 00006000 fd:01 917631 /lib64/librt-2.12.so
Expand All @@ -29,7 +29,7 @@
32b701d000 32b721c000 ---p 0001d000 fd:01 917605 /lib64/libselinux.so.1
32b721c000 32b721d000 r--p 0001c000 fd:01 917605 /lib64/libselinux.so.1
32b721d000 32b721e000 rw-p 0001d000 fd:01 917605 /lib64/libselinux.so.1
32b721e000 32b721f000 rw-p 00000000 00:00 0
32b721e000 32b721f000 rw-p 00000000 00:00 0
32c3800000 32c3804000 r-xp 00000000 fd:01 917625 /lib64/libattr.so.1.1.0
32c3804000 32c3a03000 ---p 00004000 fd:01 917625 /lib64/libattr.so.1.1.0
32c3a03000 32c3a04000 r--p 00003000 fd:01 917625 /lib64/libattr.so.1.1.0
Expand Down
10 changes: 5 additions & 5 deletions src/test/util_map_proc/maps_align_linux
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
00400000-0041c000 r-xp 00000000 fd:01 1310785 /some/path/testfile
0061b000-0061c000 rw-p 0001b000 fd:01 1310785 /some/path/testfile
0061c000-0061d000 rw-p 00000000 00:00 0
0061c000-0061d000 rw-p 00000000 00:00 0
0081c000-0081d000 rw-p 0001c000 fd:01 1310785 /some/path/testfile
02699000-026ba000 rw-p 00000000 00:00 0 [heap]
32b5000000-32b5020000 r-xp 00000000 fd:01 917587 /lib64/ld-2.12.so
32b521f000-32b5220000 r--p 0001f000 fd:01 917587 /lib64/ld-2.12.so
32b5220000-32b5221000 rw-p 00020000 fd:01 917587 /lib64/ld-2.12.so
32b5221000-32b5222000 rw-p 00000000 00:00 0
32b5221000-32b5222000 rw-p 00000000 00:00 0
32b5400000-32b558b000 r-xp 00000000 fd:01 917588 /lib64/libc-2.12.so
32b558b000-32b578a000 ---p 0018b000 fd:01 917588 /lib64/libc-2.12.so
32b578a000-32b578e000 r--p 0018a000 fd:01 917588 /lib64/libc-2.12.so
32b578e000-32b578f000 rw-p 0018e000 fd:01 917588 /lib64/libc-2.12.so
32b578f000-32b5794000 rw-p 00000000 00:00 0
32b578f000-32b5794000 rw-p 00000000 00:00 0
32b5c00000-32b5c02000 r-xp 00000000 fd:01 917594 /lib64/libdl-2.12.so
32b5c02000-32b5e02000 ---p 00002000 fd:01 917594 /lib64/libdl-2.12.so
32b5e02000-32b5e03000 r--p 00002000 fd:01 917594 /lib64/libdl-2.12.so
Expand All @@ -20,7 +20,7 @@
32b6017000-32b6217000 ---p 00017000 fd:01 917592 /lib64/libpthread-2.12.so
32b6217000-32b6218000 r--p 00017000 fd:01 917592 /lib64/libpthread-2.12.so
32b6218000-32b6219000 rw-p 00018000 fd:01 917592 /lib64/libpthread-2.12.so
32b6219000-32b621d000 rw-p 00000000 00:00 0
32b6219000-32b621d000 rw-p 00000000 00:00 0
32b6800000-32b6807000 r-xp 00000000 fd:01 917631 /lib64/librt-2.12.so
32b6807000-32b6a06000 ---p 00007000 fd:01 917631 /lib64/librt-2.12.so
32b6a06000-32b6a07000 r--p 00006000 fd:01 917631 /lib64/librt-2.12.so
Expand All @@ -29,7 +29,7 @@
32b701d000-32b721c000 ---p 0001d000 fd:01 917605 /lib64/libselinux.so.1
32b721c000-32b721d000 r--p 0001c000 fd:01 917605 /lib64/libselinux.so.1
32b721d000-32b721e000 rw-p 0001d000 fd:01 917605 /lib64/libselinux.so.1
32b721e000-32b721f000 rw-p 00000000 00:00 0
32b721e000-32b721f000 rw-p 00000000 00:00 0
32c3800000-32c3804000 r-xp 00000000 fd:01 917625 /lib64/libattr.so.1.1.0
32c3804000-32c3a03000 ---p 00004000 fd:01 917625 /lib64/libattr.so.1.1.0
32c3a03000-32c3a04000 r--p 00003000 fd:01 917625 /lib64/libattr.so.1.1.0
Expand Down
10 changes: 5 additions & 5 deletions src/test/util_map_proc/maps_all_freebsd
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
00400000 0041c000 r-xp 00000000 fd:01 1310785 /some/path/testfile
0061b000 0061c000 rw-p 0001b000 fd:01 1310785 /some/path/testfile
0061c000 0061d000 rw-p 00000000 00:00 0
0061c000 0061d000 rw-p 00000000 00:00 0
0081c000 0081d000 rw-p 0001c000 fd:01 1310785 /some/path/testfile
02699000 026ba000 rw-p 00000000 00:00 0 [heap]
32b5000000 32b5020000 r-xp 00000000 fd:01 917587 /lib64/ld-2.12.so
32b521f000 32b5220000 r--p 0001f000 fd:01 917587 /lib64/ld-2.12.so
32b5220000 32b5221000 rw-p 00020000 fd:01 917587 /lib64/ld-2.12.so
32b5221000 32b5222000 rw-p 00000000 00:00 0
32b5221000 32b5222000 rw-p 00000000 00:00 0
32b5400000 32b558b000 r-xp 00000000 fd:01 917588 /lib64/libc-2.12.so
32b558b000 32b578a000 ---p 0018b000 fd:01 917588 /lib64/libc-2.12.so
32b578a000 32b578e000 r--p 0018a000 fd:01 917588 /lib64/libc-2.12.so
32b578e000 32b578f000 rw-p 0018e000 fd:01 917588 /lib64/libc-2.12.so
32b578f000 32b5794000 rw-p 00000000 00:00 0
32b578f000 32b5794000 rw-p 00000000 00:00 0
32b5c00000 32b5c02000 r-xp 00000000 fd:01 917594 /lib64/libdl-2.12.so
32b5c02000 32b5e02000 ---p 00002000 fd:01 917594 /lib64/libdl-2.12.so
32b5e02000 32b5e03000 r--p 00002000 fd:01 917594 /lib64/libdl-2.12.so
Expand All @@ -20,7 +20,7 @@
32b6017000 32b6217000 ---p 00017000 fd:01 917592 /lib64/libpthread-2.12.so
32b6217000 32b6218000 r--p 00017000 fd:01 917592 /lib64/libpthread-2.12.so
32b6218000 32b6219000 rw-p 00018000 fd:01 917592 /lib64/libpthread-2.12.so
32b6219000 32b621d000 rw-p 00000000 00:00 0
32b6219000 32b621d000 rw-p 00000000 00:00 0
32b6800000 32b6807000 r-xp 00000000 fd:01 917631 /lib64/librt-2.12.so
32b6807000 32b6a06000 ---p 00007000 fd:01 917631 /lib64/librt-2.12.so
32b6a06000 32b6a07000 r--p 00006000 fd:01 917631 /lib64/librt-2.12.so
Expand All @@ -29,7 +29,7 @@
32b701d000 32b721c000 ---p 0001d000 fd:01 917605 /lib64/libselinux.so.1
32b721c000 32b721d000 r--p 0001c000 fd:01 917605 /lib64/libselinux.so.1
32b721d000 32b721e000 rw-p 0001d000 fd:01 917605 /lib64/libselinux.so.1
32b721e000 32b721f000 rw-p 00000000 00:00 0
32b721e000 32b721f000 rw-p 00000000 00:00 0
32c3800000 32c3804000 r-xp 00000000 fd:01 917625 /lib64/libattr.so.1.1.0
32c3804000 32c3a03000 ---p 00004000 fd:01 917625 /lib64/libattr.so.1.1.0
32c3a03000 32c3a04000 r--p 00003000 fd:01 917625 /lib64/libattr.so.1.1.0
Expand Down
Loading

0 comments on commit c82ee55

Please sign in to comment.