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
Commits
6091e5b2
Commit
6091e5b2
authored
3 years ago
by
Camille Simiand
Browse files
Options
Downloads
Patches
Plain Diff
Fix pre-commit hook scripts order and remove ESLint for now
parent
9be17b0e
No related branches found
No related tags found
1 merge request
!27
tuleap-108-add-stricter-code-quality-tools-configuration
Pipeline
#665
passed
3 years ago
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/git-hooks/pre-commit
+32
-16
32 additions, 16 deletions
tools/git-hooks/pre-commit
with
32 additions
and
16 deletions
tools/git-hooks/pre-commit
+
32
−
16
View file @
6091e5b2
...
...
@@ -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 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
}
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
ESLint
...
\n
${
NORMAL
}
"
$
npm
run lint
echo
-e
"
\n
${
BOLD
}
Starting
Unit and Functional Tests
...
\n
${
NORMAL
}
"
$
composer
tests
if
[
$?
!=
0
]
;
then
echo
-e
"
\n
${
REDBOLD
}
ESLint verification
failed
\n
${
NORMAL
}
"
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
}
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment