Skip to content
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

Extend by the Code Climate output format #50

Merged
merged 1 commit into from
May 8, 2021
Merged

Extend by the Code Climate output format #50

merged 1 commit into from
May 8, 2021

Conversation

lukas9393
Copy link

Hi, we use this linter in our PHP projects. We have our repositories in GitLab and use the CI pipeline there. When we run the CI pipeline, we run QA tools. When the pipeline is executed, we want GitLab to load the errors from a json file and display them in the merge request. This should make it easier to see which bugs have been added and which have been fixed.

For this we use the Code Quality widget. This requires creating a Json file that implements a subset of the code-climate specification.

With this merge request I suggest that this linter supports this format so that not every CI pipeline has to use a converter.

We also use PHPStan, they support this format.

PHP_CodeSniffer do not support the format, but they offer the possibility to include external reports/formats. I have not discovered this possibility in this linter. We strongly want to avoid using a fork for this feature, so I made this merge request.

Sorry for bothering you with this issue.

@lukas9393
Copy link
Author

Is there any information missing or does the pull request not match your requirements?

@grogy
Copy link
Member

grogy commented Mar 20, 2021

For the first look it is ok. I will try on any project and is possible to merge it

Copy link

@roelofr roelofr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but your tests could be a bit more thorough.

It might even be an idea to support CodeClimate directly, which would automatically support GitLab too.

I'd recommend waiting for, or rebasing onto #45.

src/Output.php Show resolved Hide resolved
tests/Settings.parseArguments.phpt Show resolved Hide resolved
src/Output.php Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
tests/Settings.parseArguments.phpt Show resolved Hide resolved
The Code Climate format is used in the GitLab CI/CD to show errors in
the merge request page. The simple JSON format is not sufficient for
this.
@lukas9393 lukas9393 requested a review from grogy March 31, 2021 14:10
@lukas9393
Copy link
Author

Does the test tests/OutputTest::testGitLabOutput meet your expectations or is there anything that can be improved?
Is the status that we are waiting for PR #45?

@grogy grogy merged commit a6090fc into php-parallel-lint:master May 8, 2021
@grogy
Copy link
Member

grogy commented May 8, 2021

PR #45 need more time from me, so i merged this. Thank you 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants