-
-
Notifications
You must be signed in to change notification settings - Fork 344
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
Add Relative Path to Report Output #706
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.
The tests will need to cover getBaseName
new method. Right now it does not because the violation class is mocked.
But if you have trouble, I can add them.
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.
The tests will need to cover
getBaseName
new method. Right now it does not because the violation class is mocked.But if you have trouble, I can add them.
This I don't fully understand. Can you help?
* | ||
* @return string | ||
*/ | ||
public function getBaseName() |
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.
Would it be beneficial if we move this method up, such as getFileName() on line 141? I suggest we move it next to \PDepend\Source\AST\ASTCompilationUnit::getFileName
. Would that be a better idea?
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.
That can be a good idea, but we need to take care that it means we also need to upper the minimum PDepend version for PHPMD. You can create a PR on PDepend, that means that we need to create a new release for that project before merging this PR.
Because your addition on the getRuleViolationMock function in the src/test/php/PHPMD/AbstractTest.php class you mock the getBaseName method. That is useful for the other tests. But now your change on the src/test/php/PHPMD/Renderer/JSONRendererTest.php and the src/test/resources/files/renderer/json_renderer_expected.json doesn't really test the newly added method. The most visible way to validate it is by running phpunit with the option |
@ttomdewit are you still interested in pursuing this? |
@ravage84 Yes, but I’m recovering from burnout and dealing with depression so I’m not able to commit to anything I’m afraid. |
@ttomdewit no worries. We can keep it open for you. Have a good recovery. |
Type: (feature)
Issue: Resolves #704
Breaking change: no
Explain what the PR does and also why. If you have parts you are not sure about, please explain.
This PR adds a
baseName
key to the report that'll allow for easier reading. In my case I need the baseName key for GitLab CI/CD.Please check this points before submitting your PR.
If you have a change on the documentation, please link to the page that you change.If you really need to add a breaking change, explain why it is needed. Understand that this result in a lower change to get the PR accepted.