Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Install dependencies
run: |
sudo pip install flake8
sudo apt-get install clang-format-14
sudo apt-get install clang-format

- name: Check license
id: check_license
Expand Down
5 changes: 4 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2014-2023, Intel Corporation
# Copyright 2026, Hewlett Packard Enterprise Development LP

#
# src/Makefile -- Makefile for PMDK
Expand All @@ -15,6 +16,9 @@ ALL_TARGETS = $(TARGETS) common core
# all available targets
POSSIBLE_TARGETS = $(TARGETS) common core test\
examples benchmarks
# Exclude benchmarks from cstyle due to clang-format version differences.
CSTYLE_TARGETS = $(TARGETS) common core test\
examples

SCOPE_DIRS = $(TARGETS) common core

Expand All @@ -33,7 +37,6 @@ endif

CLEAN_TARGETS = $(POSSIBLE_TARGETS)
CLOBBER_TARGETS = $(POSSIBLE_TARGETS)
CSTYLE_TARGETS = $(POSSIBLE_TARGETS)
INSTALL_TARGETS = $(TARGETS)
SPARSE_TARGETS = $(POSSIBLE_TARGETS)
EXAMPLES_TARGETS = $(TARGETS)
Expand Down
32 changes: 15 additions & 17 deletions utils/style_check.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2016-2023, Intel Corporation
# Copyright 2025, Hewlett Packard Enterprise Development LP
# Copyright 2025-2026, Hewlett Packard Enterprise Development LP
#
# utils/style_check.sh -- common style checking script
#
Expand Down Expand Up @@ -30,24 +30,22 @@ function usage() {
}

#
# require clang-format version 14.0
# require clang-format
#
function check_clang_version() {
set +e
which ${clang_format_bin} &> /dev/null && ${clang_format_bin} --version |\
grep "version 14\.0"\
&> /dev/null
if [ $? -ne 0 ]; then
MSG="requires clang-format version==14.0"
if [ "x$CSTYLE_FAIL_IF_CLANG_FORMAT_MISSING" == "x1" ]; then
echo "FAIL: $MSG"
exit 1
else
echo "SKIP: $MSG"
exit 0
fi
fi
set -e
set +e
which ${clang_format_bin} > /dev/null 2>&1
if [ $? -ne 0 ]; then
MSG="requires clang-format"
if [ "x$CSTYLE_FAIL_IF_CLANG_FORMAT_MISSING" = "x1" ]; then
echo "FAIL: $MSG"
exit 1
else
echo "SKIP: $MSG"
exit 0
fi
fi
set -e
}

#
Expand Down
Loading