Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit d2e47ba

Browse files
committed
Fixed static tests
1 parent d3c0b97 commit d2e47ba

File tree

1 file changed

+32
-30
lines changed

1 file changed

+32
-30
lines changed

src/contributor-guide/pull-request-tests.md

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ Integration Tests are PHPUnit-based tests that check the behaviour of group of M
3737

3838
### WebAPI Tests
3939
WebAPI Tests are functional tests that check the behavior of Magento Web API endpoints. They send requests to endpoints of installed Magento instance and and then check the response received and the state of the instance. Currently they include three kinds of tests:
40-
* SOAP Web API tests
41-
* REST Web API tests
42-
* GraphQL WEB API tests
40+
- SOAP Web API tests
41+
- REST Web API tests
42+
- GraphQL WEB API tests
4343

4444
### Static Tests
4545
Static Tests are set of different checks that analyze each single file of Magento code base separately. Most of them analyze the whole Magento code base whereas some run only against the change set.
@@ -51,33 +51,33 @@ Database Compare is a test which compares DB schema and data between freshly ins
5151
### Magento Component Health Index
5252

5353
Magento Component Health Index is a test which analyses Magento code quality and calculates weighted health index (100 is great, lower is worse) per Magento Component (module). The index is calculated based on 3 groups of indicators:
54-
* General code quality indicators (GCQI). The metrics described [here](http://pdepend.org/documentation/software-metrics/index.html):
55-
* Inheritance rate
56-
* Coupling Between Objects
57-
* Cyclomatic Complexity Number
58-
* Class Size
59-
* NPath Complexity
60-
* Code Rank
61-
* Number Of Methods
62-
* Number Of Child Classes
63-
* Magento-specific code quality indicators (MSCQ):
64-
* Inline JS usage (<script> tag without attribute **x-magento-init** or **x-magento-template**)
65-
* PHP Static method calls (except unit tests)
66-
* PHP global state usage (global variables usage & static local variable usage, registry object usage)
67-
* PHP usage of protected modifiers for methods & properties (except unit tests)
68-
* PHP and JS 'fixmeComments' usage (**TODO**, **FIXME**, **HACK**, **XXX**, **@SuppressWarnings** etc.)
69-
* Legacy API usage indicators (LAI):
70-
* Legacy method calls in action classes (**loadLayout()**, **renderLayout()** etc.)
71-
* Legacy classes extension (**\Magento\Backend\Block\Widget\Grid\Extended**, **\Magento\Backend\Block\Widget\Form**, **\Magento\Backend\Block\Widget\Form\Generic**, **\Magento\Payment\Model\Method\AbstractMethod**, **\Magento\Payment\Model\Method\Cc**, **\Magento\Backend\Block\Widget\Grid** etc.)
72-
* Legacy layout block classes usage
73-
* Direct class calls instead of an interface that has DI preference
74-
* Comparison of composer dependencies against etalon file
54+
- General code quality indicators (GCQI). The metrics described [here](http://pdepend.org/documentation/software-metrics/index.html):
55+
- Inheritance rate
56+
- Coupling Between Objects
57+
- Cyclomatic Complexity Number
58+
- Class Size
59+
- NPath Complexity
60+
- Code Rank
61+
- Number Of Methods
62+
- Number Of Child Classes
63+
- Magento-specific code quality indicators (MSCQ):
64+
- Inline JS usage (<script> tag without attribute **x-magento-init** or **x-magento-template**)
65+
- PHP Static method calls (except unit tests)
66+
- PHP global state usage (global variables usage & static local variable usage, registry object usage)
67+
- PHP usage of protected modifiers for methods & properties (except unit tests)
68+
- PHP and JS 'fixmeComments' usage (**TODO**, **FIXME**, **HACK**, **XXX**, **@SuppressWarnings** etc.)
69+
- Legacy API usage indicators (LAI):
70+
- Legacy method calls in action classes (**loadLayout()**, **renderLayout()** etc.)
71+
- Legacy classes extension (**\Magento\Backend\Block\Widget\Grid\Extended**, **\Magento\Backend\Block\Widget\Form**, **\Magento\Backend\Block\Widget\Form\Generic**, **\Magento\Payment\Model\Method\AbstractMethod**, **\Magento\Payment\Model\Method\Cc**, **\Magento\Backend\Block\Widget\Grid** etc.)
72+
- Legacy layout block classes usage
73+
- Direct class calls instead of an interface that has DI preference
74+
- Comparison of composer dependencies against etalon file
7575

7676
## Running tests for a pull request {#run-pull-request-tests}
7777

7878
Automated tests can be triggered manually with an appropriate comment:
79-
- `@magento run all tests` - run or re-run all required tests against the PR changes
80-
- `@magento run <test-build(s)>` - run or re-run specific test build(s)
79+
- `@magento run all tests` - run or re-run all required tests against the PR changes
80+
- `@magento run <test-build(s)>` - run or re-run specific test build(s)
8181
For example: `@magento run Unit Tests` or `@magento run Unit Tests,Integration Tests`
8282

8383
`<test-build(s)>` is a comma-separated list of build names. Allowed build names are:
@@ -107,10 +107,12 @@ When the contribution requires changes to more than one repository merged simult
107107

108108
The related pull requests should be specified in the pull request description in the following format:
109109

110-
### Related Pull Requests
111-
https://github.com/<organization>/<repository>/pull/<pull request number>
112-
<links to other realted PRs>
113-
<!-- related pull request placeholder -->
110+
```
111+
### Related Pull Requests
112+
https://github.com/<organization>/<repository>/pull/<pull request number>
113+
<links to other realted PRs>
114+
<!-- related pull request placeholder -->
115+
```
114116

115117
When the tests are launched against a pull request that contains links to related pull request in the description the related pull requests branches will be used as a code base for the tests instead of mainline.
116118
Check runs will be updated for each of the related pull requests.

0 commit comments

Comments
 (0)