ok, I would like a testing system on local that could help me pass the gitlab code quality test. Is PHP_CodeSniffer the right test for that?
- composer global require "squizlabs/php_codesniffer=*"
- add this in composer.json:
{
"require-dev": {
"squizlabs/php_codesniffer": "3.*"
}
}
3
D:\xampp2\htdocs\sesa_final\sesa-e-commerce\vendor\bin>phpcs -h
Usage: phpcs [-nwlsaepqvi] [-d key[=value]] [--colors] [--no-colors] [--stdin-path=]
[--report=] [--report-file=] [--report-=] ...
[--report-width=] [--generator=] [--tab-width=]
[--severity=] [--error-severity=] [--warning-severity=]
[--runtime-set key value] [--config-set key value] [--config-delete key] [--config-show]
[--standard=] [--sniffs=] [--exclude=] [--encoding=]
[--extensions=] [--ignore=] [--bootstrap=]
[--file-list=] ...
Set runtime value (see --config-set)
-n Do not print warnings (shortcut for --warning-severity=0)
-w Print both warnings and errors (this is the default)
-l Local directory only, no recursion
...
number 3 instead of showing the test result, it shows all these info.
I also try :
D:\xampp2\htdocs\sesa_final\sesa-e-commerce\vendor\bin>phpcs -n
but it takes forever.. any clue how to test the error message?