-
Notifications
You must be signed in to change notification settings - Fork 59
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
Stop duplicate code comments for code review. #181
Stop duplicate code comments for code review. #181
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.
We may still want to verify the docs syntax are valid?
Yes, I understand the intention. But there must be another way to do it, so the code reviewers don't have to see all these duplicates. Another approach could be if we spun this code into a separate GHA that also triggers on push, like the action it is in now. But do you know if that would stop the duplicates, or would they still show up in the review? Or we could verify the syntax when creating a release (the new GHA, which I am working on). |
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.
OK.
The reason seems to be that dotnet build in the doc-tests generate annotations which should not be forcely applied. If we can disable the annotation for doc-tests
suspected actions/setup-dotnet introduced it, we can keep the test (It's unreasonable we disable a test because it generates extra warning instead of fix it).
But given that the docs should be relatively stably correct and we can fix any violations later spotted, we can disable it first.
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.
Replace dotnet build -p:TargetFramework=net7.0
with dotnet build -p:TargetFramework=net7.0 --property WarningLevel=0
should help.
Functionality checks are covered by unit-tests, we run it in doc-tests for prepare infos only.
Okay. So I tried to use the code in your comment, here in my test repo https://github.com/entvex/pulsar-dotpulsar/pull/2/files. And it looks like the normal unit test will make errors if there are any doc XML syntax errors. Therefor, I really think we only need to run doc test, when we do a release. And therefore it does not need to be part of the CI unit test pipeline. |
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.
Although the docfx docs/api/docfx.json
should run more test than dotnet build
and a per PR test should prevent us to postpone all potential issues until releases, I don't insist to block this patch and approve its merge.
9eb5b38
to
c6dc46f
Compare
When reviewing a pull request, duplicated errors pollute the code view unnecessarily.
c6dc46f
to
01e4c6c
Compare
Description
When reviewing a pull request, duplicated errors pollute the code view unnecessarily.
Example
When reviewing code. We just want a clean view to do it.