FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
AndroidMultiModuleTemplate/scripts/git-hooks/pre-commit.sh at master · KryptKode/AndroidMultiModuleTemplate · GitHub
KryptKode
/
AndroidMultiModuleTemplate
Public template
Notifications
You must be signed in to change notification settings
Fork
1
Star
2
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
AndroidMultiModuleTemplate
/
scripts
/
git-hooks
/
pre-commit.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
23 lines (21 loc) · 735 Bytes
Breadcrumbs
AndroidMultiModuleTemplate
/
scripts
/
git-hooks
/
pre-commit.sh
Copy path
File metadata and controls
executable file
·
23 lines (21 loc) · 735 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!
/bin/sh
echo
"
Running static analysis...
"
JAVA_HOME=
$(
/usr/libexec/java_home -v 1.8
)
export
JAVA_HOME
OUTPUT=
"
/tmp/analysis-result
"
./gradlew ktlintFormat detekt ktlintCheck lintDebug --daemon
>
${OUTPUT}
EXIT_CODE=
$?
if
[
${EXIT_CODE}
-ne
0 ]
;
then
cat
${OUTPUT}
rm
${OUTPUT}
echo
"
*********************************************
"
echo
"
Static Analysis Failed
"
echo
"
Please fix the above issues before committing
"
echo
"
*********************************************
"
exit
${EXIT_CODE}
else
rm
${OUTPUT}
echo
"
*********************************************
"
echo
"
Static analysis no problems found
"
echo
"
*********************************************
"
fi
Back
|
FazBrowse Home
|
New Git URL