Skip to content

Make the analyzer comment readable - #4

Merged
dignajar merged 1 commit into
mainfrom
fix/clearer-analyzer-messages
Sep 22, 2026
Merged

dignajar merged 1 commit into
mainfrom
fix/clearer-analyzer-messages

Conversation

@dignajar

Copy link
Copy Markdown
Member

The comment on #1 was hard to act on, so this is a pass over how a finding is presented and how it is worded.

Before

**`languages/en.json`** — `description` differs: the submission says `HTML editor for
formatting content, a lightweight WYSIWYG alternative to Markdown.`, `languages/en.json`
says `HTML Editor for formatting content. Lightweight WYSIWYG alternative for the users
who don't want to work with Markdown code.`.  `LANG_MISMATCH`
The directory lists the submission, Bludit shows this file once the plugin is installed.
A visitor would read two different texts.

Both values are inside one sentence, so comparing them means reading the line to the end twice. The header points at languages/en.json, but the file to change might be the submission.

After

The English description does not match the plugin  LANG_MISMATCH

  • plugins/jodit.json — HTML editor for formatting content, a lightweight WYSIWYG alternative to Markdown.
  • jodit/languages/en.json — HTML Editor for formatting content. Lightweight WYSIWYG alternative for the users who don't want to work with Markdown code.

Somebody browsing the directory reads the first one, and then sees the second once they install the plugin. Make them the same, or say in this pull request which one is right.

What changed

A finding can carry its values. New optional detail on a finding, a list of label and value pairs, rendered one per line. Both filenames are named, so it is clear there are two places and either could be the one to fix.

The source rules stopped repeating the location. Every one of them put the file and line inside the message while the header already showed both, so the problem itself landed at the end of the line. plugin.php uses eval() on line 7. → plugin.php:7 — Uses eval().

The advice assumed you knew the answer. SRC_ECHO_INPUT said to pass the value through Sanitize::html(); it now says a crafted link would otherwise run script on your site. ID_BUNDLED said to choose another id; it now says every site already has that plugin and installing over it would replace part of Bludit.

Repeated advice prints once per section. Two fields disagreeing used to print the same paragraph twice.

Checks

No code changed meaning, so all 63 fixtures pass unchanged — 12 corpus, 35 submission, 16 payload. Rendered both a warnings-only comment (jodit, from its real release asset) and an error-heavy one (a plugin calling eval, an assembled function name, an unescaped $_GET, and three fields disagreeing with its zip).

A finding said what was wrong, where, and what to do in one run-on
sentence, and a mismatch put both values inside it. Comparing two long
descriptions meant reading a single line to the end twice.

A finding now carries an optional detail, a list of label and value
pairs, and the renderer puts each on its own line. The two texts sit
under each other and the difference is visible.

The source rules repeated the file and the line inside the message while
the header already showed both, so the actual problem arrived at the end
of a line nobody finishes. They say what is wrong and nothing else now.

The advice itself was written for somebody who already knew the answer.
SRC_ECHO_INPUT said to pass the value through Sanitize::html, it now
says why a crafted link would otherwise run script on the site.
META_MISMATCH said the submission is what the directory lists, it now
names both files and says which one a visitor reads when.

Repeated advice is printed once per section. Two fields disagreeing used
to mean the same paragraph twice, which buried the fields.
@dignajar
dignajar merged commit 4cfb0e6 into main Sep 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant