In general, embodiments of the invention provide an approach to discover and enforce coding conventions among a group of developers. Specifically, source code files for a group of developers are imported from a code repository. The source code files are analyzed to discover the commonly used coding conventions of the group. Convention templates are generated based on these coding conventions. Each convention template is assigned a weighted value, and the convention templates are reviewed and approved based on the weighted value.