[#3110] Reconciled comments and docblocks with the code they describe. - #3123
Conversation
…o what the code guarantees.
|
Warning Review limit reached
On-demand reviews are free for the next 12 days. After that, they cost $0.25 per reviewed file. Or wait 34 minutes for your next included review. View limit detailsLimit details: You’ve used all 2 included reviews currently available. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (62)
Comment |
|
Code coverage (threshold: 90%) Per-class coverage |
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
|
Code coverage (threshold: 90%) Per-class coverage |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3123 +/- ##
==========================================
- Coverage 87.13% 86.79% -0.35%
==========================================
Files 108 101 -7
Lines 5169 4998 -171
Branches 49 3 -46
==========================================
- Hits 4504 4338 -166
+ Misses 665 660 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
📖 Documentation preview for this pull request has been deployed to Netlify: https://6aa0a181016a895b4e03575d--vortex-docs.netlify.app This preview is rebuilt on every commit and is not the production documentation site. |
Closes #3110
Summary
SchemaValidator::validate()in.vortex/installer/src/Schema/SchemaValidator.phpnow reads$configdirectly since the identity methodnormalizeConfig()is deleted, and.vortex/tooling/tests/_helper.bashplus six.vortex/tests/and.vortex/tooling/tests/scripts now pair theirLCOV_EXCL_START/LCOV_EXCL_STOPcoverage markers for the first time.normalizeConfig()was documented as mappingVORTEX_INSTALLER_PROMPT_*environment variable names to handler IDs, but its body only copied$configinto$normalizedunchanged on everyvalidate()call; 26 of the 40.vortex/tooling/tests/unit/*.batsheaders named a script Vortex does not ship, such asfetch-db.sh,update-vortex.shandnotify.shon everynotify-*file, instead of the extensionlessvortex-*binary each test actually runs; and.vortex/tooling/tests/_helper.bashcarried anLCOV_EXCL_STOPwith no matchingSTARTsince commit 92d66fa deleted the arm64 platform-override block the pair bracketed.After merge,
Validator::isGitRef()'s docblock lists the complete git-ref rule set including the+character the pattern already accepted, all 40 tooling BATS headers converge on# Unit tests for the '<script>' script.naming the real file under test, andHandlerInterface::discover()andresolvedMessage()describe their actual contracts instead of a nonexistenthandlerManager;--promptsCLI parsing, environment discovery and file/directory discovery behave exactly as before, and.vortex/docs/content/development/variables.mdxis untouched.Before / After
Changes
.vortex/installer/src/Command/InstallCommand.php: removed the strayRun command.summary line aboveInstall command., matchingBuildCommandandCheckRequirementsCommand..vortex/installer/src/Utils/Validator.php,.vortex/installer/src/Utils/Normalizer.php: deleted class docblocks copied from other classes (Converter./Convert strings to different formats.andInstaller configuration./Installer config is a config of this installer script.);Drupal.Commenting.ClassCommentis excluded in.vortex/installer/phpcs.xmland 8 of the 16Utils/classes already carry no class docblock..vortex/installer/src/Prompts/Handlers/HandlerInterface.php:shouldRun()'s@returnnow describes itsboolresult instead of a nonexistent condition callback;discover()'s summary and@returnnow cover discovery fromcomposer.json,.env, files and directories, not only environment variables;resolvedMessage()'s reference to a nonexistenthandlerManagerand the garbled "handlering" are removed..vortex/installer/src/Prompts/Handlers/CustomModules.php:removeDemoBehatFeatures()'s docblock now says the@demotag is matched anywhere in a.featurefile's contents, matching whatFile::findContainingInDir()does..vortex/installer/src/Prompts/PromptManager.php:runPrompts()now says each prompt returns its default in non-interactive mode;resolvePromptOverrides()drops the claim that it normalizes keys to handler IDs and the inline comment claiming$rawreads resolved defaults for missing prompts;args()drops an orphanedThe handler id.line left under the@param $handler_classtag..vortex/installer/src/Utils/OptionsResolver.php:resolve()'s docblock now says each installer variable is resolved from the CLI options, the--configJSON and the environment, replacing the claim that values come from$this->config->get()alone..vortex/installer/src/Utils/Git.php:listRemotes()'s inline comment now says the trailing(fetch)/(push)suffix is stripped from$parts[1], the remote URL, not from the remote name..vortex/installer/src/Utils/FileManager.php:removeObsoletePaths()'s docblock drops the sentence describing that it runs aftercopyFiles(), keeping the docblock caller-agnostic..vortex/installer/src/Utils/Validator.php:isGitRef()'s rule list is completed (adds+to the allowed characters, adds the..////trailing-/rejections) and the duplicate six-line inline comment restating the same rules is deleted..vortex/installer/src/Schema/SchemaValidator.php: deletesnormalizeConfig();validate()iterates$configdirectly and passes it tocheckDependency(), whose@paramnow describes "The config array, keyed by handler ID" instead of "The normalized config"..vortex/installer/tests/Unit/Utils/EnvTest.php,.vortex/installer/tests/Unit/Utils/ValidatorTest.php: deleted class docblocks namingInstallerDotEnvTest/InstallerHelpersTest, classes that do not exist in these files, matching the other 10 classes intests/Unit/Utils/that already carry no class docblock..vortex/installer/tests/Functional/Command/BuildCommandTest.php: the data-provider docblock now namestestBuildCommand, the method that consumes it, instead oftestBuildWithMockedRunner..vortex/tooling/tests/unit/*.bats(40 files): every header now names the script the file actually executes and converges on# Unit tests for the '<script>' script.;provision-*.batsandpost-coverage-comment.batsalready named real files and keep their subject..vortex/tooling/src/vortex-doctor: usage lines citevortex-doctorandvortex-doctor infoinstead ofdoctor.sh..vortex/tooling/src/vortex-notify-email: the description line states the send mechanism (sendmailormail) instead of repeating the summary, and the usage line citesvortex-notify-emailinstead of./notify-email..vortex/tooling/tests/_helper.bash: restores theLCOV_EXCL_STARTabove theDOCKER_DEFAULT_PLATFORMreporting branch, pairing it with theLCOV_EXCL_STOPorphaned when commit 92d66fa removed the arm64 override block..vortex/tests/lint.ci.sh,lint.dockerfiles.sh,lint.markdown.sh,lint.scripts.sh,test.common.sh,.vortex/tooling/tests/fixtures/fixture.sh: each closes its whole-fileLCOV_EXCL_STARTwith a trailingLCOV_EXCL_STOP.Verification
.vortex/installer:composer lint(phpcs, phpstan, rector) exit 0;composer testgreen, 1658 tests / 5490 assertions..vortex:ahoy lint-scriptsexit 0;ahoy test-bats tooling/tests/unitexit 0, 338 tests.ahoy update-docsregenerates no changes, so.vortex/docs/content/development/variables.mdxis unaffected.