forked from Murmele/Gittyup
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Murmele#618 from mwerle/feature/clean_build
chore: fix compiler warnings
- Loading branch information
Showing
60 changed files
with
410 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/mirrors-clang-format | ||
rev: v13.0.1 | ||
hooks: | ||
- id: clang-format | ||
args: [ -i ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
cd "`dirname "$0"`" | ||
|
||
PRE_COMMIT=${SCRIPT_DIR}/.venv/bin/pre-commit | ||
|
||
pre_commit() { | ||
# Set up pre-commit hook | ||
if [ ! -f "${PRE_COMMIT}" ]; then | ||
pushd ${SCRIPT_DIR} | ||
python3 -m venv .venv | ||
.venv/bin/pip install pre-commit | ||
popd | ||
fi | ||
${PRE_COMMIT} install | ||
} | ||
|
||
remove_pre_commt() { | ||
if [ -f "${PRE_COMMIT}" ]; then | ||
${PRE_COMMIT} uninstall | ||
fi | ||
} | ||
|
||
if [ $# -eq 0 ]; then | ||
set -- --help | ||
fi | ||
|
||
for arg in "$@"; do | ||
case $arg in | ||
pre_commit | pre-commit | install_pre_commit | install-pre-commit) | ||
pre_commit | ||
;; | ||
remove_pre_commit | remove-pre-commit | uninstall_pre_commit | uninstall-pre-commit) | ||
remove_pre_commit | ||
;; | ||
*) | ||
echo "USAGE $0 [commands]" | ||
echo " Commands:" | ||
echo " install-pre-commit - installs pre-commit hooks" | ||
echo " uninstall-pre-commit - removes pre-commit hooks" | ||
;; | ||
esac | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.