Skip to content

Display magic comment options in Settings panel#113

Open
alies-dev wants to merge 1 commit intopsalm:masterfrom
alies-dev:document-magic-comments
Open

Display magic comment options in Settings panel#113
alies-dev wants to merge 1 commit intopsalm:masterfrom
alies-dev:document-magic-comments

Conversation

@alies-dev
Copy link
Copy Markdown
Contributor

@alies-dev alies-dev commented Apr 5, 2026

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, variables

URL parameters:

  • ?php=8.1 — set PHP target version

Uses the commandfor/command HTML attributes for the dialog trigger. Dialog content is shared between index.php and snippet.php via includes/help_dialog.php.

@alies-dev alies-dev force-pushed the document-magic-comments branch 4 times, most recently from ad2eb1d to 5f0c4da Compare April 5, 2026 11:18
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.
@alies-dev alies-dev force-pushed the document-magic-comments branch from 5f0c4da to cf65087 Compare April 5, 2026 11:22
@alies-dev
Copy link
Copy Markdown
Contributor Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant