31
2
mirror of https://github.com/joomla-extensions/jedchecker.git synced 2024-05-31 20:50:48 +00:00

show node content in errors/warnings messages

This commit is contained in:
Denis Ryabov 2021-02-24 00:44:53 +03:00
parent c11c23c15a
commit 2cae2d0deb
2 changed files with 10 additions and 10 deletions

View File

@ -44,11 +44,11 @@ COM_JEDCHECKER_INFO_XML_NAME_XML="The name tag in this file is: <b>%s</b>"
COM_JEDCHECKER_INFO_XML_VERSION_XML="Version tag has the value: %s"
COM_JEDCHECKER_INFO_XML_CREATIONDATE_XML="The creationDate tag has the value: %s"
COM_JEDCHECKER_INFO_XML_NO_MANIFEST="No manifest file found"
COM_JEDCHECKER_INFO_XML_NAME_MODULE_PLUGIN="Listing name contains 'module' or 'plugin'"
COM_JEDCHECKER_INFO_XML_NAME_RESERVED_KEYWORDS="Keywords such as module, plugin or template are considered reserved words and can't be used in the extension names"
COM_JEDCHECKER_INFO_XML_NAME_VERSION="Version in name/title"
COM_JEDCHECKER_INFO_XML_NAME_JOOMLA="An extension name can't start with the word 'Joomla'"
COM_JEDCHECKER_INFO_XML_NAME_JOOMLA_DERIVATIVE="Extensions that use 'Joomla' or a derivative of Joomla in the extension name need to be licensed by OSM"
COM_JEDCHECKER_INFO_XML_NAME_MODULE_PLUGIN="Listing name ('%s') contains 'module' or 'plugin'"
COM_JEDCHECKER_INFO_XML_NAME_RESERVED_KEYWORDS="Keywords such as module, plugin or template are considered reserved words and can't be used in the extension names ('%s')"
COM_JEDCHECKER_INFO_XML_NAME_VERSION="Version in name/title ('%s')"
COM_JEDCHECKER_INFO_XML_NAME_JOOMLA="An extension name ('%s') can't start with the word 'Joomla'"
COM_JEDCHECKER_INFO_XML_NAME_JOOMLA_DERIVATIVE="Extensions that use 'Joomla' or a derivative of Joomla in the extension name ('%s') need to be licensed by OSM"
COM_JEDCHECKER_INFO_XML_URL_JOOMLA_DERIVATIVE="Extensions that use 'Joomla' or a derivative of Joomla in the domain name ('%s') need to be licensed by OSM"
COM_JEDCHECKER_INFO_XML_NAME_ADMIN_MENU="The admin menu name '%1$s' isn't the same as the extension name '%2$s'"
COM_JEDCHECKER_INFO_XML_NAME_PLUGIN_FORMAT="The name of the plugin ('%s') must comply with the JED naming conventions in the form '{Type} - {Extension Name}'"

View File

@ -221,26 +221,26 @@ class JedcheckerRulesXMLinfo extends JEDcheckerRule
// NM3 - Listing name contains “module” or “plugin”
if (preg_match('/\b(?:module|plugin)\b/i', $extension_name))
{
$this->report->addError($file, JText::_('COM_JEDCHECKER_INFO_XML_NAME_MODULE_PLUGIN'));
$this->report->addError($file, JText::sprintf('COM_JEDCHECKER_INFO_XML_NAME_MODULE_PLUGIN', $extension_name));
}
if (stripos($extension_name, 'template') !== false)
{
$this->report->addWarning($file, JText::_('COM_JEDCHECKER_INFO_XML_NAME_RESERVED_KEYWORDS'));
$this->report->addWarning($file, JText::sprintf('COM_JEDCHECKER_INFO_XML_NAME_RESERVED_KEYWORDS', $extension_name));
}
// NM5 - Version in name/title
if (preg_match('/(?:\bversion\b|\d\.\d)/i', $extension_name))
{
$this->report->addError($file, JText::_('COM_JEDCHECKER_INFO_XML_NAME_VERSION'));
$this->report->addError($file, JText::sprintf('COM_JEDCHECKER_INFO_XML_NAME_VERSION', $extension_name));
}
if (stripos($extension_name, 'joomla') === 0)
{
$this->report->addError($file, JText::_('COM_JEDCHECKER_INFO_XML_NAME_JOOMLA'));
$this->report->addError($file, JText::sprintf('COM_JEDCHECKER_INFO_XML_NAME_JOOMLA', $extension_name));
}
elseif (stripos($extension_name, 'joom') !== false)
{
$this->report->addWarning($file, JText::_('COM_JEDCHECKER_INFO_XML_NAME_JOOMLA_DERIVATIVE'));
$this->report->addWarning($file, JText::sprintf('COM_JEDCHECKER_INFO_XML_NAME_JOOMLA_DERIVATIVE', $extension_name));
}
$url = (string)$xml->authorUrl;