Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bwinf
medal
Commits
3281c4cf
Commit
3281c4cf
authored
Mar 01, 2021
by
Robert Czechowski
Browse files
Enhance error reporting of cargofmt pre-commit hook (code formatting)
parent
0f78b669
Pipeline
#1092
passed with stages
in 22 minutes and 9 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tools/pre-commit
View file @
3281c4cf
#!/bin/sh
cargo +nightly
fmt
--
--check
status
=
$?
if
test
$status
-ne
0
then
echo
"
\0
33[1;31m"
echo
" =============================================="
echo
" | Error: Code not properly formatted |"
echo
" | Commit not successfull |"
echo
" =============================================="
echo
"
\0
33[0m"
fi
exit
$status
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