These guidelines are mostly targeted at Python files. HTML files, zpt files, shell scripts, etc should adhere to these as much as is reasonable and conventional in those languages.
-
Indentation - Each level of indentation in Python files is 4 spaces. Tab characters are strictly verboten, their use will bring shame and ridicule upon the perpetrator.
-
File Header - Most files should contain a standard Zenoss header at or near the top which contains copyright and licensing notices. This header may be different depending on whether the file is part of Core, Enterprise or a ZenPack. Headers are not currently used for most html, zpt and dtml files.
-
Vertical Spacing - Every method, function and class definition should be preceded by two blank lines. Small functions defined within another function or method are excepted from this.
-
Identifiers - Most identifier names should usually be CamelCase. Constants are ALL_CAPS_WITH_UNDERSCORES as needed. ClassNames and FunctionNames begin with a capital. methodNames and variableNames begin lower case. Choose significant names as identifiers without creating ridiculously long names for us all to type repeatedly.