Dave Sag
Dave Sag

Reputation: 13486

How can I get the CodeClimate CLI to emit more detail?

I'm using the CodeClimate CLI to perform analysis of a codebase I've inherited, and, while it certainly works, its output is quite limited.

For example, when it says

23-30: Similar code found in 4 other locations (mass = 27) [duplication]

It would be nice if it said which 4 other locations, and showed a small code snippet.

Is there a way to get more verbose output?

Upvotes: 3

Views: 556

Answers (1)

Dave Schweisguth
Dave Schweisguth

Reputation: 37617

You're probably hoping for more information in the text output; I don't think there's any way to get that in the stock Code Climate CLI.

The best I know how to do is to look at the JSON output, which you get by running codeclimate with the json format:

codeclimate analyze -f json

(or e.g. codeclimate analyze -e duplication -f json to give yourself less JSON to wade through). Code Climate uses JSON internally and the JSON formatter just passes it through, so every piece of information that an engine emits is there.

If you want richer text output, you'd have to extend codeclimate yourself. You'd need to modify the plain text formatter to understand the additional JSON that the engine you're interested in emits.

Upvotes: 2

Related Questions