Display magic comment options in Settings panel#113
Open
alies-dev wants to merge 1 commit intopsalm:masterfrom
Open
Display magic comment options in Settings panel#113alies-dev wants to merge 1 commit intopsalm:masterfrom
alies-dev wants to merge 1 commit intopsalm:masterfrom
Conversation
ad2eb1d to
5f0c4da
Compare
Add a help section to the Settings panel documenting the magic comments that enable hidden features: - `<?php // --taint-analysis` — enables taint/security analysis - `<?php // findUnusedCode` — enables unused code detection These features were only discoverable by reading the source code.
5f0c4da to
cf65087
Compare
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The Settings panel lists checkbox options but doesn't mention magic comments that enable additional analysis modes. These features were only discoverable by reading the source code.
This adds a "More options..." button at the bottom of the Settings panel that opens a
<dialog>documenting:Magic comments (first line of code):
<?php // --taint-analysis— enable taint/security analysis<?php // checkTaintedInput— alias<?php // trackTaints— alias<?php // findUnusedCode— detect unused classes, methods, properties, variablesURL parameters:
?php=8.1— set PHP target versionUses the
commandfor/commandHTML attributes for the dialog trigger. Dialog content is shared betweenindex.phpandsnippet.phpviaincludes/help_dialog.php.