Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pistache
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
pistache
Commits
91510e35
Unverified
Commit
91510e35
authored
Jun 09, 2021
by
Kip
Committed by
GitHub
Jun 09, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #906 from Tachi107/git-format-hook
Add pre-commit format hook
parents
e3c40485
ea39290f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
.hooks/pre-commit
.hooks/pre-commit
+5
-0
meson.build
meson.build
+2
-0
No files found.
.hooks/pre-commit
0 → 100644
View file @
91510e35
#!/bin/sh
for
file
in
$(
git diff-index
--cached
--name-only
HEAD |
grep
-E
'\.(cpp|cc|hpp|h)$'
)
;
do
clang-format
--dry-run
--Werror
"
$file
"
>
/dev/null 2>&1
||
(
echo
'Run ninja clang-format before committing'
&&
false
)
done
meson.build
View file @
91510e35
...
...
@@ -106,3 +106,5 @@ endif
if get_option('PISTACHE_BUILD_DOCS')
subdir('docs')
endif
run_command('git', 'config', '--local', 'core.hooksPath', '.hooks')
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment