Node KO 2013: ClearCommit

Update: Our submission is completed and live. Check it out and consider voting for us! See also a more detailed tech post.

Ryan Lucas, Zach Allaun, and myself (Kevin Lynagh) are competing in the 2013 Node Knockout, a 48-hour programming competition. This post provides a high-level overview of our submission; we will be posting details throughout the contest.

Developers use Git to store code—text designed to be understood by computers. However, Git understands nothing about code; ask it for changes and it’ll only tell you about lines and files. But we don’t think about lines and files—we think about classes, functions, and modules. Enter ClearCommit, a rich, semantic diff tool for codebases.

Static analysis isn’t a new idea; Code Climate and SonarSource offer it as a service, after all. However, we wanted to build a more transparent tool; instead of deriving an opaque “complexity score” or “code GPA”, ClearCommit analyzes a codebase and extracts the elemental pieces:

It then looks at how these elemental pieces differ between two commits of a project:

Note that these commits don’t have to be sequential—they don’t even have to be from the same project. ClearCommit helps you answer questions like:

ClearCommit is not a linter like jsHint, pylint, or Go’s lint. It does not look at your source code and tell you to adjust braces, discard unused arguments, or quit shadowing variables. It just helps you get your bearings between two commits by lifting you out of syntax so you can better see the semantics.

Of course, for any of this analysis to be useful, it must be available wherever a developer needs it:

There’s a lot here, but we’re hoping that we can whip together a solid proof of concept in 48 hours. Wish us luck!