#7428 closed defect (bug) (fixed)
Warn for missing plugin name in Readme Parser
Reported by: | rabmalin | Owned by: | dd32 |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Plugin Directory | Keywords: | |
Cc: |
Description
In plugin readme, I believe plugin name in following three formats. If it is not matched then Parser should return some warning.
=== Plugin Name ===
# Plugin Name
Plugin Name ===
Currently if readme starts like this:
Contributors: rabmalin
Then parser takes Contributors: rabmalin
as plugin name and continue parsing other headers.
Change History (6)
#2
@
10 months ago
- Owner set to dd32
- Resolution set to fixed
- Status changed from new to closed
In 13162:
#3
@
10 months ago
@dd32 Warning invalid_plugin_name_header
is currently raised in two different cases. One is when plugin name is plugin name
and another is when no header is found. Rather than using same warning key, may be different warning keys will help display messages in the client based on the condition. May be missing_plugin_name_header
?
#4
@
10 months ago
I think invalid_plugin_name_header
is appropriate for both cases.
It's set to an invalid value, completely missing, empty string, or 'plugin name' are all just as useless as one another.
It's kind of pointless to have that as 3 different errors, it just makes it more difficult for an end user.
#5
@
10 months ago
Ok. In that case may be we need to tweak the message in the validator to accommodate the changes.
Even if there is no heading, validator will display message like this.
We cannot find a plugin name in your readme. Plugin names look like: === Plugin Name ===. Please change Plugin Name to reflect the actual name of your plugin.
This is kind of intentional in a way, as we accept readme's to have invalid headers and really don't mind parsing it completely incorrectly if completely incorrect input is provided.
I can come up with many different variations of a readme that would fail parsing in one manner or another, and we can't really warn on all of them.