Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documented ruleset #66

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
278 changes: 278 additions & 0 deletions docs/Ruleset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,278 @@
# Classes

Code | Level | Rule
-----|-------|-------
M019 | PATCH | [public] Property overwrite has been added.
M020 | PATCH | [protected] Property overwrite has been added.
M026 | PATCH | [private] Property overwrite has been added.
M028 | PATCH | Method overwrite has been added.
M029 | PATCH | Method overwrite has been removed.
M071 | MINOR | Constant has been added.
M073 | MAJOR | Constant has been removed.
M075 | PATCH | Constant has been moved to parent class or implemented interface.
M091 | PATCH | [public] Method has been moved to parent class.
M093 | PATCH | [public] Property has been moved to parent class.
M094 | PATCH | [protected] Property has been moved to parent class.
M095 | PATCH | [protected] Method has been moved to parent class.
M0122 | MAJOR | Extends has been removed.
M0123 | MAJOR | Implements has been removed.
M0124 | MINOR | Parent has been added.
M0125 | MINOR | Interface has been added.
M0126 | MINOR | New trait has been used.
M0141 | MINOR | @api annotation has been added.
M0142 | MAJOR | @api annotation has been removed.
M100 | MINOR | Removed last method parameter(s).
M101 | PATCH | Removed last constructor parameter(s).
M102 | MINOR | [public,protected] Added optional parameter(s).
M102 | PATCH | [private] Added optional parameter(s).
M103 | MINOR | Added a required constructor object parameter.
M109 | MAJOR | Constant visibility has been changed to lower lever from %s to %s
M109 | MINOR | Constant visibility has been changed to higher lever from %s to %s
M109 | MAJOR | Method visibility has been changed to lower lever from %s to %s
M109 | MINOR | Method visibility has been changed to higher lever from %s to %s
M109 | MAJOR | Property visibility has been changed to lower lever from %s to %s
M109 | MINOR | Property visibility has been changed to higher lever from %s to %s
M111 | MINOR | Added an optional constructor parameter to extendable @api class.
M112 | PATCH | Added an optional constructor parameter.
M113 | MAJOR | [public] Method parameter typing changed.
M114 | MAJOR | [protected] Method parameter typing changed.
M115 | PATCH | [private] Method parameter typing changed.
M120 | MAJOR | [public] Method return typing changed.
M121 | MAJOR | [protected] Method return typing changed.
M122 | PATCH | [private] Method return typing changed.
M127 | MAJOR | Exception has been superclassed.
M129 | MINOR | Exception has been subclassed.
M131 | MAJOR | Superclassed Exception has been added.
M134 | MAJOR | [public] Method parameter typehint was moved from doc block annotation to in-line.
M135 | MAJOR | [public] Method parameter typehint was moved from in-line to doc block annotation.
M136 | MAJOR | [public] Method return typehint was moved from doc block annotation to in-line.
M137 | MAJOR | [public] Method return typehint was moved from in-line to doc block annotation.
M146 | MAJOR | [public] Method variable typehint was moved from doc block annotation to in-line.
M149 | MAJOR | [public] Method variable typehint was moved from in-line to doc block annotation.
M152 | MINOR | [protected] Method parameter typehint was moved from doc block annotation to in-line.
M154 | MINOR | [protected] Method parameter typehint was moved from in-line to doc block annotation.
M156 | MINOR | [protected] Method return typehint was moved from doc block annotation to in-line.
M158 | MINOR | [protected] Method return typehint was moved from in-line to doc block annotation.
M160 | MINOR | [protected] Method variable typehint was moved from doc block annotation to in-line.
M162 | MINOR | [protected] Method variable typehint was moved from in-line to doc block annotation.
M164 | PATCH | [private] Method parameter typehint was moved from doc block annotation to in-line.
M166 | PATCH | [private] Method parameter typehint was moved from in-line to doc block annotation.
M168 | PATCH | [private] Method return typehint was moved from doc block annotation to in-line.
M170 | PATCH | [private] Method return typehint was moved from in-line to doc block annotation.
M172 | PATCH | [private] Method variable typehint was moved from doc block annotation to in-line.
M174 | PATCH | [private] Method variable typehint was moved from in-line to doc block annotation.

# Interface

Code | Level | Rule
-----|-------|-------
M072 | MINOR | Constant has been added.
M074 | MAJOR | Constant has been removed.
M076 | PATCH | Constant has been moved to parent class or implemented interface.
M092 | PATCH | [public] Method has been moved to parent class.
M096 | PATCH | [protected] Method has been moved to parent class.
M0122 | MAJOR | Extends has been removed.
M0127 | MINOR | Added parent to interface.
M100 | MINOR | Removed last method parameter(s).
M102 | MAJOR | Added optional parameter(s).
M109 | MAJOR | Constant visibility has been changed to lower lever from %s to %s
M109 | MINOR | Constant visibility has been changed to higher lever from %s to %s
M109 | MAJOR | Method visibility has been changed to lower lever from %s to %s
M109 | MINOR | Method visibility has been changed to higher lever from %s to %s
M109 | MAJOR | Property visibility has been changed to lower lever from %s to %s
M109 | MINOR | Property visibility has been changed to higher lever from %s to %s
M116 | MAJOR | Method parameter typing changed.
M123 | MAJOR | Method return typing changed.
M128 | MAJOR | Exception has been superclassed.
M130 | MINOR | Exception has been subclassed.
M132 | MAJOR | Superclassed Exception has been added.
M138 | MAJOR | Method parameter typehint was moved from doc block annotation to in-line.
M139 | MAJOR | Method parameter typehint was moved from in-line to doc block annotation.
M140 | MAJOR | Method return typehint was moved from doc block annotation to in-line.
M141 | MAJOR | Method return typehint was moved from in-line to doc block annotation.
M147 | MAJOR | Method variable typehint was moved from doc block annotation to in-line.
M150 | MAJOR | Method variable typehint was moved from in-line to doc block annotation.

# Trait

Code | Level | Rule
-----|-------|-------
M100 | MINOR | Removed last method parameter(s).
M102 | MINOR | Added optional parameter(s).
M117 | MAJOR | [public] Method parameter typing changed.
M118 | MAJOR | [protected] Method parameter typing changed.
M119 | MAJOR | [private] Method parameter typing changed.
M124 | MAJOR | [public] Method return typing changed.
M125 | MAJOR | [protected] Method return typing changed.
M126 | MAJOR | [private] Method return typing changed.
M142 | MAJOR | [public] Method parameter typehint was moved from doc block annotation to in-line.
M143 | MAJOR | [public] Method parameter typehint was moved from in-line to doc block annotation.
M144 | MAJOR | [public] Method return typehint was moved from doc block annotation to in-line.
M145 | MAJOR | [public] Method return typehint was moved from in-line to doc block annotation.
M148 | MAJOR | [public] Method variable typehint was moved from doc block annotation to in-line.
M151 | MAJOR | [public] Method variable typehint was moved from in-line to doc block annotation.
M153 | MINOR | [protected] Method parameter typehint was moved from doc block annotation to in-line.
M155 | MINOR | [protected] Method parameter typehint was moved from in-line to doc block annotation.
M157 | MINOR | [protected] Method return typehint was moved from doc block annotation to in-line.
M159 | MINOR | [protected] Method return typehint was moved from in-line to doc block annotation.
M161 | MINOR | [protected] Method variable typehint was moved from doc block annotation to in-line.
M163 | MINOR | [protected] Method variable typehint was moved from in-line to doc block annotation.
M165 | MINOR | [private] Method parameter typehint was moved from doc block annotation to in-line.
M167 | MINOR | [private] Method parameter typehint was moved from in-line to doc block annotation.
M169 | MINOR | [private] Method return typehint was moved from doc block annotation to in-line.
M171 | MINOR | [private] Method return typehint was moved from in-line to doc block annotation.
M173 | MINOR | [private] Method variable typehint was moved from doc block annotation to in-line.
M175 | MINOR | [private] Method variable typehint was moved from in-line to doc block annotation.

# Database

Code | Level | Rule
-----|-------|-------
M104 | MAJOR | Table was dropped
M105 | MAJOR | Table chard was changed from %s to %s
M106 | MINOR | Key was dropped. But it can be used for 3-rd parties foreign keys
M107 | MAJOR | Column was removed
M108 | MAJOR | Foreign key removed from declaration but it may have had business logic in onDelete statement
M108 | MAJOR | Foreign key was removed
M109 | MINOR | Whitelist do not have table %s declared in db_schema.xml
M109 | MAJOR | Db Whitelist from module %s was removed
M110 | MAJOR | Module db schema whitelist reduced (%s).
M202 | MINOR | Table was added
M203 | MINOR | Column was added
M204 | MAJOR | Foreign key was added
M205 | MAJOR | Foreign key was changed
M205 | MAJOR | Primary key was added
M206 | MAJOR | Primary key was changed
M207 | MAJOR | Primary key was removed
M208 | MAJOR | Unique key was added
M209 | MAJOR | Unique key was removed
M210 | MAJOR | Unique key was changed

# XSD

Code | Level | Rule
-----|-------|-------
M0133 | MINOR | An optional node was added
M0134 | MINOR | An optional attribute was added
M0135 | MAJOR | A required node was added
M0136 | MAJOR | A required attribute was added
M0137 | MAJOR | A node was removed
M0138 | MAJOR | An attribute was removed
M0139 | MAJOR | A schema declaration was removed
M0140 | MINOR | A schema declaration was added

# DI

Code | Level | Rule
-----|-------|-------
M200 | MAJOR | Virtual Type was removed
M201 | MAJOR | Virtual Type was changed

# MFTF

Code | Level | Rule
-----|-------|-------
M200 | MAJOR | \<actionGroup\> was removed
M201 | MAJOR | \<actionGroup\> \<argument\> was removed
M202 | MAJOR | \<actionGroup\> \<action\> was removed
M202 | MAJOR | \<actionGroup\> \<argument\> was changed
M204 | PATCH | \<actionGroup\> \<action\> was changed
M205 | MAJOR | Entity was removed
M206 | MAJOR | Entity \<array\> element was removed
M207 | MINOR | Entity \<array\> \<item\> element was removed
M208 | MAJOR | Entity \<data\> element was removed
M209 | MAJOR | Entity \<required-entity\> element was removed
M210 | MAJOR | Entity \<var\> element was removed
M211 | MAJOR | \<operation\> was removed
M212 | MAJOR | \<operation\> child element was removed
M213 | MAJOR | \<page\> was removed
M214 | MAJOR | \<page\> \<section\> was removed
M215 | MAJOR | \<section\> was removed
M216 | MAJOR | \<section\> \<element\> was removed
M217 | PATCH | \<section\> \<element\> was changed
M218 | PATCH | \<section\> \<element\> type was changed
M218 | MAJOR | \<test\> was removed
M219 | PATCH | \<section\> \<element\> selector was changed
M219 | MAJOR | \<test\> \<action\> was removed
M220 | MAJOR | \<test\> \<annotation\> \<group\> was removed
M221 | PATCH | \<test\> \<annotation\> was removed or changed
M222 | PATCH | \<test\> \<action\> was changed
M223 | PATCH | \<actionGroup\> \<action\> type was changed
M223 | MAJOR | \<test\> \<action\> sequence was changed
M224 | PATCH | \<test\> \<action\> type was changed
M225 | MINOR | \<actionGroup\> was added
M226 | MINOR | \<actionGroup\> \<action\> was added
M227 | MAJOR | \<actionGroup\> \<argument\> was added
M228 | MINOR | \<entity\> was added
M229 | MINOR | \<entity\> \<array\> was added
M230 | MINOR | Entity \<data\> element was added
M231 | PATCH | \<entity\> \<required-entity\> element was added
M232 | MINOR | \<entity\> \<var\> element was added
M233 | MINOR | \<page\> was added
M234 | MINOR | \<page\> \<section\> was added
M235 | MINOR | \<section\> was added
M236 | MINOR | \<section\> \<element\> was added
M237 | MINOR | \<test\> was added
M238 | MINOR | \<test\> \<action\> was added
M239 | PATCH | \<test\> \<annotation\> was added
M240 | MINOR | \<operation\> was added
M241 | MINOR | \<operation\> was changed
M241 | MINOR | \<test\> \<actionGroup\> ref was changed
M242 | MINOR | \<operation\> child element was added
M250 | MAJOR | \<section\> \<element\> parameterized was changed
M401 | MAJOR | \<test\> \<remove action\> was added
M402 | MAJOR | \<test\> \<remove action\> was removed
M404 | MAJOR | \<actionGroup\> \<remove action\> was added
M406 | MAJOR | \<actionGroup\> \<remove action\> was removed
M407 | MINOR | \<suite\> was added
M408 | PATCH | \<suite\> was removed
M409 | PATCH | \<suite\> \<include/exclude\> \<group/test/module\> was added
M410 | PATCH | \<suite\> \<include/exclude\> \<group/test/module\> was removed
M412 | MINOR | \<suite\> \<before/after\> \<action\> was added
M415 | MAJOR | \<suite\> \<before/after\> \<action\> was removed
M416 | PATCH | \<suite\> \<before/after\> \<action\> was changed
M417 | MINOR | \<suite\> \<before/after\> \<actionGroup\> ref was changed
M418 | MAJOR | \<suite\> \<before/after\> \<action\> sequence was changed
M419 | PATCH | \<suite\> \<before/after\> \<action\> type was changed
M420 | MAJOR | \<suite\> \<before/after\> \<remove\> \<action\> was added
M421 | MAJOR | \<suite\> \<before/after\> \<remove\> \<action\> was removed

# Layout

Code | Level | Rule
-----|-------|-------
M220 | MAJOR | Block was removed
M221 | MAJOR | Container was removed
M222 | MAJOR | An Update was removed

# System

Code | Level | Rule
-----|-------|-------
M300 | MINOR | System configuration file was added
M301 | MAJOR | System configuration file was removed
M302 | MINOR | A field-node was added
M303 | MAJOR | A field-node was removed
M304 | MINOR | A group-node was added
M305 | MAJOR | A group-node was removed
M306 | MINOR | A section-node was added
M307 | MAJOR | A section-node was removed

# Less

Code | Level | Rule
-----|-------|-------
M400 | MAJOR | A less variable-node was removed
M401 | MAJOR | A less mixin-node was removed
M402 | MAJOR | A less import-node was removed
M403 | MAJOR | A parameter was added to the mixin-node

# ET Schema

Code | Level | Rule
-----|-------|-------
T001 | MAJOR | Removed declaration for type %s.
T002 | MAJOR | Removed field %s from type %s.
T003 | MAJOR | Changed field %s declaration in type %s.
T004 | MINOR | Added a new declaration for record %s.
T005 | PATCH | Added field %s to type %s.