Commit a4e0fb2d authored by Jérome Perrin's avatar Jérome Perrin

CodingStyle: ignore more skins and prefixs

Module is an acceptable prefix for modules

Introduce a list of skins IDs that does not match our conventions but
are acceptable because this is what external API are calling.
parent f98f1411
......@@ -77,18 +77,32 @@ def getSkinPrefixList(self):
# Add other prefix
skin_prefix_list.extend((
'ERP5Type',
'Module',
'Brain', # Catalog brains
'DCWorkflow', # some workflow script use this, not sure it's correct.
'SkinsTool',
'Entity', # A base class for Person / Organisation
'Zuite', # Products.Zelenium test suites
'Form', # Acceptable for ERP5 Forms which will soon become portal types too
# ERP5Form
'Form',
'ListBox',
'DCWorkflow', # some workflow script use this, not sure it's correct.
'Zuite', # from Zelenium
'Brain', # Catalog brains
'PlanningBox',
'OOoChart',
))
return set(skin_prefix_list)
# Some skin names that does not respect our conventions but are ignored, for example
# when this naming is used by zope.
ignored_skin_id_set = {
'twiddleAuthCookie',
'setAuthCookie',
}
# Generic method to check consistency of a skin item
def checkConsistency(self, fixit=0, source_code=None):
"""
......@@ -103,7 +117,7 @@ def checkConsistency(self, fixit=0, source_code=None):
# Make sure id is acceptable
document_id = self.id
if document_id != document_id.lower():
if document_id != document_id.lower() and document_id not in ignored_skin_id_set:
# Only test prefix with big caps
prefix = document_id.split('_')[0]
if prefix not in getSkinPrefixList(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment