The main goal of beta1 is to increase code quality.
PHPMD
Following #3460800: [2.0.0-beta1] Reduce code complexity
vendor/bin/phpmd path/to/ui_patterns/modules/ui_patterns_devel text codesize is raising those alerts.
I know it is not very important to fix them because they are in tests classes, but we want to add PHPMD to the Gitlab CI piepeline, so it would be nice to fix them (without suppressing them) to avoid noisy results.
TwigValidatorRuleTest::processNode()
Cyclomatic Complexity of 13. The configured cyclomatic complexity threshold is 10.
TwigValidatorRuleFilterTest::providerTestTwigValidatorFilter()
ExcessiveMethodLength: 121 lines of code. Current threshold is set to 100. Avoid really long methods.
TwigValidatorRuleFunctionTest::providerTestTwigValidatorFunction()
ExcessiveMethodLength: 168 lines of code. Current threshold is set to 100. Avoid really long methods.
PHPCS
16 use phpcs:disable in all ui_patterns 2.x, all of them but on are in ui_patterns_devel. It is OK to use this directive but it is even better to address the feedbacks.
src/Plugin/TwigValidatorRule/TwigValidatorRuleFilter.php: // @phpcs:disable Drupal.Semantics.FunctionT.NotLiteralString
src/Plugin/TwigValidatorRule/TwigValidatorRuleTest.php: // @phpcs:disable
src/ValidatorMessage.php: // phpcs:disable Drupal.Semantics.FunctionT.NotLiteralString
src/ValidatorMessage.php: // phpcs:disable Drupal.Semantics.FunctionT.NotLiteralString
src/ValidatorMessage.php: // phpcs:disable Drupal.Semantics.FunctionT.NotLiteralString
tests/src/Unit/TwigNodeFinderTest.php: * phpcs:disable Drupal.Commenting.VariableComment.Missing
tests/src/Unit/TwigValidatorRulePluginTest.php: * phpcs:disable Drupal.Commenting.VariableComment.Missing
tests/src/Unit/TwigValidatorRulePluginTest.php: * @phpcs:disable DrupalPractice.Objects.UnusedPrivateMethod.UnusedMethod
tests/src/Kernel/TwigValidatorTestBase.php: * phpcs:disable Drupal.Commenting.VariableComment.Missing,
tests/src/Kernel/ValidatorTest.php: * phpcs:disable Drupal.Commenting.VariableComment.Missing
tests/src/Kernel/TwigValidatorRule/TwigValidatorRuleFilterTest.php: * phpcs:disable Drupal.Arrays.Array.LongLineDeclaration,Drupal.Commenting.InlineComment.SpacingBefore,Drupal.Files.LineLength.TooLong
tests/src/Kernel/TwigValidatorRule/TwigValidatorRuleFunctionTest.php: * phpcs:disable Drupal.Arrays.Array.LongLineDeclaration,Drupal.Commenting.InlineComment.SpacingBefore
tests/src/Kernel/TwigValidatorRule/TwigValidatorRuleNameTest.php: * phpcs:disable Drupal.Arrays.Array.LongLineDeclaration,Drupal.Commenting.DocComment.MissingShort
tests/src/Kernel/TwigValidatorRule/TwigValidatorRuleGetAttrTest.php: * phpcs:disable Drupal.Arrays.Array.LongLineDeclaration
tests/src/Kernel/TwigVariableCollectorTest.php: * @phpcs:disable Drupal.Commenting.FunctionComment.Missing
Issue fork ui_patterns-3463153
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
pdureau commentedComment #3
pdureau commentedThursday 25th, we decided during the weekly meeting that only fixes outside the tests/ folder will be done. Inside the
tests/folder, we will do some annotation skips instead.So, the expected scope is way smaller
PHPMD
Only one fix to do:
PHPCS
Only 5 fixes to do (or skips to confirm):
Comment #4
pdureau commentedComment #5
pdureau commentedMikael, can you also activate the merge block is CI checks are KO?
Comment #9
just_like_good_vibesComment #10
pdureau commented