Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32159582
rust_pre_commit.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
508 B
Referenced Files
None
Subscribers
None
rust_pre_commit.sh
View Options
#!/usr/bin/env bash
set
-e
# shellcheck source=/dev/null
[[
-r
"
$HOME
"
/.cargo/env
]]
&&
source
"
$HOME
"
/.cargo/env
if
[[
"
$#
"
-eq
0
]]
;
then
echo
"no Cargo project paths provided"
exit
1
fi
command
-v
cargo
>
/dev/null
# iterate over all provided Cargo project paths
for
directory
in
"
$@
"
;
do
pushd
"
$directory
"
>
/dev/null
echo
"formatting
${
directory
}
..."
cargo
fmt
--all
--
--check
echo
"checking
${
directory
}
..."
cargo
check
popd
>
/dev/null
# $directory
done
echo
"done formatting"
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Sun, Dec 7, 4:34 PM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5252476
Default Alt Text
rust_pre_commit.sh (508 B)
Attached To
Mode
rCOMM Comm
Attached
Detach File
Event Timeline
Log In to Comment