-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
[FEATURE] add codeclimate iteration zero #93
base: master
Are you sure you want to change the base?
Conversation
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.
Looking good so far! 👍 I've commented a few nitpicks regarding your PR, but nothing major. To top this of, a test case for the new printer (as you've already noted in #92) would be awesome.
Maybe we could also add a "Integrating with Gitlab" section to the README (either within this PR, if you want, or later in a separate change).
'type' => 'issue', | ||
'check_name' => $issue->getSource(), | ||
'description' => $issue->getMessage(), | ||
'categories' => ['Style'], |
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 all checks fit into the Style
category. For instance, the DuplicateAssignmentSniff
might also fit into the Bug Risk
category.
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.
Do you have a hint how to connect your issue to the categorie? From your code I have not seen an entry point to extract an issue category.
'description' => $issue->getMessage(), | ||
'categories' => ['Style'], | ||
'location' => [ | ||
'path' => $file->getFilename(), |
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 entirely sure -- I think that $file->getFilename()
might possibly return the absolute file name, whereas the code climate spec requires the relative file name (to the working dir, presumably).
With #91 (still work-in-progress, however), there is a utility class Helmich\TypoScriptLint\Linter\ReportPrinter\PathUtils
coming in that implements just this; maybe we could already pull that class into this PR.
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.
I know, can you tell me, maybe it makes sense to expose an getAbsolutePath
and getRelativePath
function from the file object? You could store the pathes splitted in 2 parts and return that easily.
Co-Authored-By: Martin Helmich <[email protected]>
Thanks a lot for your input. As i said, it was the first itaration for checking if it's possible - and yes it needs some more care :) |
What's the status here? Would love to see this kind of outputs for GitLab. |
#92
#92