Skip to content

Commit

Permalink
Removes unwanted files accidentally committed
Browse files Browse the repository at this point in the history
  • Loading branch information
luc-guyot-infomaniak committed Mar 19, 2024
1 parent 6a49611 commit 0e4371e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 19 deletions.
11 changes: 6 additions & 5 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/sh
#
# A hook script to format the source files about to be committed with clang-format.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
# Called by "git commit" with no arguments.
# The hook exit with non-zero status after issuing an appropriate message if
# the formatting operation failed.
#

echo "The pre-commit hook for automated formatting is activated. Use '--no-verify' to by-pass it."
Expand All @@ -14,12 +14,13 @@ staged_files=`git diff --name-only --cached`
for file in ${staged_files}
do
# Source file filtering is based on file extensions.
if [ -f "$file" ] && [[ "$file" =~ ^.*\.(ino|cpp|cc|c|h|hpp|hh|mm)$ ]]; then
if [ -f "${file}" ] && [[ "${file}" =~ ^.*\.(ino|cpp|cc|c|h|hpp|hh|mm)$ ]]; then
clang-format -i ${file} --style="file:${GIT_DIR}/../.clang-format"
git add ${file}
formatting_exit_code=$?
if [ ${formatting_exit_code} -ne 0 ]; then
echo "The program clang-format issued an error on file ${file}. Commit aborted."
exit $formatting_exit_code
exit ${formatting_exit_code}
fi
fi
done
6 changes: 0 additions & 6 deletions .idea/copyright/Infomaniak_Open_Source.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/copyright/profiles_settings.xml

This file was deleted.

1 change: 0 additions & 1 deletion sonar-project.properties

This file was deleted.

0 comments on commit 0e4371e

Please sign in to comment.