[Bro-Dev] capitalization standardization

Seth Hall seth at icir.org
Mon Mar 7 13:02:32 PST 2011

Now that I'm *finally* digging into these scripts, I've noticed that there isn't a lot of standardization across scripts with regard to capitalization.  I want to propose the following style for scripts (keep in mind this won't be enforced by the language, just a common practice).

Module names: Camel cased, no underscores (all uppercase for abbreviations)
	Examples: FTP, SSH, Notice, Remote, Signatures

Types: Camel cased, no underscores
	Examples: Log, Connection, EntropyTestResult, GeoLocation, Packet

Enum values: Upper-case with underscores

Variables: Lower-case with underscores
	Examples: example_variable, ftp_sessions

This should follow the established conventions of most scripts (unfortunately not all).  Did I leave anything out?

The enum values doesn't quite work because Notice enum values have been defined as Camel-cased with underscores mostly.  I'm sort of inclined to leave this as it is because it pinpoints when a notice type is being defined.  I suppose that would be a subcategory of enum values that is just done specially.


Seth Hall
International Computer Science Institute
(Bro) because everyone has a network

More information about the bro-dev mailing list