mirror of
https://github.com/joomla-extensions/jedchecker.git
synced 2025-01-01 06:01:46 +00:00
check prefixed names
This commit is contained in:
parent
4ac26c9282
commit
084367bc78
@ -46,6 +46,7 @@ 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_CREATIONDATE_XML="The creationDate tag has the value: %s"
|
||||||
COM_JEDCHECKER_INFO_XML_NO_MANIFEST="No manifest file found"
|
COM_JEDCHECKER_INFO_XML_NO_MANIFEST="No manifest file found"
|
||||||
COM_JEDCHECKER_INFO_XML_NAME_RESERVED_KEYWORDS="Keywords such as module, plugin or template are considered reserved words ('%2$s') and can't be used in the extension names ('%1$s')"
|
COM_JEDCHECKER_INFO_XML_NAME_RESERVED_KEYWORDS="Keywords such as module, plugin or template are considered reserved words ('%2$s') and can't be used in the extension names ('%1$s')"
|
||||||
|
COM_JEDCHECKER_INFO_XML_NAME_PREFIXED="Listing name ('%s') starts with extension type prefix"
|
||||||
COM_JEDCHECKER_INFO_XML_NAME_VERSION="Version in name/title ('%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="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_NAME_JOOMLA_DERIVATIVE="Extensions that use 'Joomla' or a derivative of Joomla in the extension name ('%s') need to be licensed by OSM"
|
||||||
|
@ -140,6 +140,12 @@ class JedcheckerRulesXMLinfo extends JEDcheckerRule
|
|||||||
$this->report->addError($file, JText::sprintf('COM_JEDCHECKER_INFO_XML_NAME_RESERVED_KEYWORDS', $extensionName, strtolower($match[0])));
|
$this->report->addError($file, JText::sprintf('COM_JEDCHECKER_INFO_XML_NAME_RESERVED_KEYWORDS', $extensionName, strtolower($match[0])));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Extension name shouldn't start with extension type prefix
|
||||||
|
if (preg_match('/^\s*(?:mod|com|plg|tpl|pkg)_/i', $extensionName))
|
||||||
|
{
|
||||||
|
$this->report->addError($file, JText::sprintf('COM_JEDCHECKER_INFO_XML_NAME_PREFIXED', $extensionName));
|
||||||
|
}
|
||||||
|
|
||||||
// NM5 - Version in name/title
|
// NM5 - Version in name/title
|
||||||
if (preg_match('/(?:\bversion\b|\d\.\d)/i', $extensionName))
|
if (preg_match('/(?:\bversion\b|\d\.\d)/i', $extensionName))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user