Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Memorekall Member New
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rekall
Memorekall Member New
Merge requests
!27
tuleap-108-add-stricter-code-quality-tools-configuration
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
tuleap-108-add-stricter-code-quality-tools-configuration
tuleap-108-add-stricter-code-quality-tools-configuration
into
main
Overview
10
Commits
21
Pipelines
10
Changes
1
Merged
Camille Simiand
requested to merge
tuleap-108-add-stricter-code-quality-tools-configuration
into
main
3 years ago
Overview
10
Commits
21
Pipelines
10
Changes
1
0
0
Merge request reports
Viewing commit
6091e5b2
Prev
Next
Show latest version
1 file
+
32
−
16
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
6091e5b2
Fix pre-commit hook scripts order and remove ESLint for now
· 6091e5b2
Camille Simiand
authored
3 years ago
tools/git-hooks/pre-commit
+
32
−
16
View file @ 6091e5b2
Edit in single-file editor
Open in Web IDE
Show full file
@@ -10,15 +10,6 @@ fi
composer
=
"
$docker
composer"
npm
=
"
$docker
npm"
echo
-e
"
\n
${
BOLD
}
Starting Unit and Functional Tests...
\n
${
NORMAL
}
"
$composer
tests
if
[
$?
!=
0
]
;
then
echo
-e
"
\n
${
REDBOLD
}
Unit tests failed
\n
${
NORMAL
}
"
exit
1
;
else
echo
-e
"
\n
${
GREENBOLD
}
Unit and functional tests passed successfully!
${
NORMAL
}
\n
"
fi
echo
-e
"
\n
${
BOLD
}
Starting PHP_CodeSniffer...
\n
${
NORMAL
}
"
$composer
phpcs
if
[
$?
!=
0
]
;
then
@@ -34,16 +25,41 @@ if [ $? != 0 ]; then
echo
-e
"
\n
${
REDBOLD
}
PHPStan verification failed
\n
${
NORMAL
}
"
exit
1
;
else
echo
-e
"
\n
${
GREENBOLD
}
Your code passed static analysis successfully!
\n
\n
Committing your changes now...
\n
${
NORMAL
}
"
echo
-e
"
\n
${
GREENBOLD
}
Your code passed static analysis successfully!
\n
${
NORMAL
}
"
fi
echo
-e
"
\n
${
BOLD
}
Starting ESLint...
\n
${
NORMAL
}
"
$npm
run lint
echo
-e
"
\n
${
BOLD
}
Starting prepare database for tests...
\n
${
NORMAL
}
"
$docker
php bin/console doctrine:database:drop
--if-exists
--force
--no-interaction
--env
=
test
&&
\
$docker
php bin/console doctrine:database:create
--if-not-exists
--no-interaction
--env
=
test
&&
\
$docker
php bin/console doctrine:migration:migrate
--all-or-nothing
--no-interaction
--env
=
test
&&
\
#$docker php bin/console doctrine:schema:validate --env=test && \
$docker
php bin/console doctrine:fixture:load
--no-interaction
--env
=
test
if
[
$?
!=
0
]
;
then
echo
-e
"
\n
${
REDBOLD
}
ESLint verification failed
\n
${
NORMAL
}
"
echo
-e
"
\n
${
REDBOLD
}
Database preparation for tests failed
\n
${
NORMAL
}
"
exit
1
;
else
echo
-e
"
\n
${
GREENBOLD
}
Database preparation for tests passed successfully
\n
${
NORMAL
}
"
fi
echo
-e
"
\n
${
BOLD
}
Starting Unit and Functional Tests...
\n
${
NORMAL
}
"
$composer
tests
if
[
$?
!=
0
]
;
then
echo
-e
"
\n
${
REDBOLD
}
Unit tests failed
\n
${
NORMAL
}
"
exit
1
;
else
echo
-e
"
\n
${
GREENBOLD
}
Your code passed JS linter successfully!
\n
\n
Committing your changes now...
\n
${
NORMAL
}
"
echo
-e
"
\n
${
GREENBOLD
}
Unit and functional tests passed successfully!
${
NORMAL
}
\n
"
fi
#echo -e "\n ${BOLD} Starting ESLint... \n ${NORMAL}"
#$npm run lint
#if [ $? != 0 ]; then
# echo -e "\n ${REDBOLD} ESLint verification failed \n ${NORMAL}"
# exit 1;
#else
# echo -e "\n ${GREENBOLD} Your code passed JS linter successfully! \n
# \n Committing your changes now... \n ${NORMAL}"
#fi
echo
-e
"
\n
${
GREENBOLD
}
Committing your changes now...
\n
${
NORMAL
}
"
Loading