New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a Codeclimate output formatter #808
Conversation
4b68678
to
b59195b
Compare
*/ | ||
private function addUncovered(array &$violationsArray, Uncovered $violation): void | ||
{ | ||
$violationsArray[] = $this->buildRuleArray($violation, $this->getUncoveredMessage($violation), 'info'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if you want to report uncovered dependencies as info
.
Skipped violations are now set to minor
and normal violations are set to major
.
Codeclimate spec defines following options: info
, minor
, major
, critical
, or blocker
and we can choose something different
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are unsure about the level, deptrac allows you to define a config for your output formatter. Look at the GrapvizOutputFormatter for reference. You could let the user decide what should be reporting level for any type of dependencies (skipped, normal, uncovered) with some reasonable default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this to config
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good. I especially like how much effort you put into testing,
For it to move forward, we definitely need to update the documentation with the new formatter.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
|
||
#### `severity` | ||
|
||
You can change how a severity of `failure`, `skipped`, `uncovered` violations will be treated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 nice touch. I like that
Related to: #807
I based this on the existing JSON output formatter.
Follows this spec: https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#data-types