-
-
Notifications
You must be signed in to change notification settings - Fork 568
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
Better output for "prettier" test #2014
Conversation
Signed-off-by: rdwebdesign <github@rdwebdesign.com.br>
I tried it locally and it works. However, the diff gets only printed if you have committed your changes already. Otherwise Sample output
|
Is this test used only after a PR or it's used in any other context? |
I run |
OK. |
Set |
But then I would not learn anything as there is not prettier output ;-) |
I will revert |
Signed-off-by: rdwebdesign <github@rdwebdesign.com.br>
Signed-off-by: rdwebdesign <github@rdwebdesign.com.br>
Is this working for you? |
I suggest not adding it as a |
My intention was not to create any hooks. I just tried to improve the current test executed after commit a PR. This PR just replaced the old test (inside test.yml) with a new test (called Of course, anyone can use the test scripts locally, but this is another story. |
I wonder if we should make it even more obvious by pushing the diff as a comment to the PR instead of having it "hidden" in the CI logs. And I agree that your making it at least visible at all is definitely already an improvement over the current simple failed status (with file but no complaint mentioned). |
I think as a comment works for me. The only reason I didn't progress on my PR to autocommit the changes was that I felt uneasy with giving a PAT perms to push to the repo (not fully explored as to whether someone could abuse this with a malicious PR) Also might cause issues with inexperienced submitters not realising they need to pull again before making more changes. (Though I guess that could be worked around with a PR comment, too.) |
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.
Having played about with this a lot (sorry for all the force pushes.. also I'm not sorry!) I am pleased with the results.
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/pi-hole-ftl-v5-12-web-v5-9-and-core-v5-7-released/51795/1 |
By submitting this pull request, I confirm the following:
git rebase
)git commit --signoff
)What does this PR aim to accomplish?:
Currently, the "prettier" test output only shows the name of the file where an error was found. This makes it difficult to correct the error.
How does this PR accomplish the above?:
This PR uses
git diff
to create more detailed output for the test.The new output adds the errors found and the lines that should be modified.
What documentation changes (if any) are needed to support this PR?:
none