Search code examples
automationstandardscoding-style

Where can I find a cross language code standard enforcement tool?


I'm in charge of the automation of our builds, tests, etc. in my company. We are very much a multi-platform shop. We are compiling .NET code, Java for android and XCode for iPhone applications. We run a build on every check in. All of our automation is done with a combination of Jenkins, NANT and ANT We have a project coming up to enforce our code standards so that variable naming, indentation, etc are all consistent within each code base.

To this end, I'm looking to add a code standard enforcement into the check-in policy. I would like either a pre-commit hook in SVN or a tool that runs during the check-in build that fails the build on violation. The problem I am finding is that every tool, CheckStyle, StyleCop, etc are really designed for one language. I'd prefer not to have to maintain three separate tools. Is there good multi-language tool that I can use for this purpose?


Solution

  • There's at least one such tool: Coverity. It is extremely powerful, expensive and slow.

    That said, I personally would pick tools for each language separately. You're running automated tests to discover errors. You may find that tools which focus on a single language uncover more errors, faster and cheaper.

    Also, you can significantly reduce some costs by using in the headless build the same tool that can be run rapidly or continuously by developers in their IDE.