Skip to content

Commit

Permalink
reference readme if clang-format not installed
Browse files Browse the repository at this point in the history
Skip-build: true

Signed-off-by: Dalton Bohning <[email protected]>
  • Loading branch information
daltonbohning committed Jan 21, 2025
1 parent 0e947c9 commit 13354b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion utils/githooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ any one of the required tools is missing.
4. `yamllint` - Linter for modified YAML configs
5. `clang-format` - Automatically formats for C/C++ files modified. If anything changed it will exit,
allowing the user to inspect the changes and retry the commit.
6. `gofmt` - Automatically formats for modified GO files
- See [.clang-format](../../.clang-format) for configuration
6. `gofmt` - Automatically formats for modified GO files
7. `isort` - Linter for python imports on modified python files
8. `flake8` - Linter for python files
9. `pylint` - Additional linter for modified python files
Expand Down
5 changes: 3 additions & 2 deletions utils/githooks/pre-commit.d/50-clang-format.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
#
# Copyright 2022-2024 Intel Corporation.
# Copyright 2025 Hewlett Packard Enterprise Development LP
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
Expand All @@ -13,11 +14,11 @@ if [ -e .git/MERGE_HEAD ]; then
fi

if ! command -v git-clang-format > /dev/null 2>&1; then
echo "git-clang-format not installed. Skipping"
echo "git-clang-format not installed. See ./utils/githooks/README.md for instructions"
exit 0
fi
if ! command -v clang-format > /dev/null 2>&1; then
echo "clang-format not installed. Skipping"
echo "clang-format not installed. See ./utils/githooks/README.md for instructions"
exit 0
fi

Expand Down

0 comments on commit 13354b3

Please sign in to comment.