Code quality and SCC systems

Well, I've just got another crazy idea...

From days of my programming in Java I remember an IDE called Together. One of its features I really liked was the code analysis tool. The thing would scan you code, collect metrics like LOC/method, cyclomatic complexity, number of methods per class, test coverage and so on and give you an impression of how quality your code is.

If I recall properly there was something similar in the Idea IDE. Also, I believe MS Visual Studio does code analysis, too.

Anyways, I thought: well, why this should be an IDE feature at all, when it really belongs to source code control systems?

Just imagine GitHub or BitBucket telling you "you know what, this file you have just uploaded is a total crap." Neat, huh?

Seriously, I would really appreciate an ability to browse my source code repository and actually see quality metrics along with the files/directories. It could be as simple as just one more column with code quality stats.

What really amazes me is why nobody came up with such a thing yet.