lint-action
lint-action copied to clipboard
Linter shows failure, and files which failed linting, but is not making comments on the code in the files via of the PR
Using an ASP.NET Framework (.NET Framework v4.7.2) solution with many projects (51) in the solution, linting fails to show on the files which have changes violating the editorconfig rules. The linter fails, and by clicking the red x in the PR to see the check failure, the annotations show, but on the files tab of the PR, the annotations are missing. An example of this page is: https://github.com/wearerequired/lint-action/pull/606/files
Tool: dotnet format Action: Runs on windows-latest Pre-requisites: Runs the following:
- Setup MSBuild
- Restore Packages
- Builds Solution
Runs the linter with the commands:
- name: Run linters
uses: wearerequired/lint-action@v2
with:
dotnet_format: true
dotnet_format_args: "./MySolutionName.sln"
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This should not be closed since there is yet to be a response.
Hello there, can you further explain how #606 is related to this? Could this be a duplicate of #577?
This is not related. I'll try to provide more details. Right now, when I use this action, I can see the action run:
When you look at the details, you can see annotations there:
Yet when you look at the file in the files tab, there are no annotations. However, per the documentation in the readme, there should be annotations:
https://github.com/wearerequired/lint-action/blob/master/.github/screenshots/check-annotations.png
What happens when you click on the "Check failure…" link? Looking at https://github.com/wearerequired/lint-action-test/runs/4766567874 and still seems to work.
What happens when you click on the "Check failure…" link? Looking at https://github.com/wearerequired/lint-action-test/runs/4766567874 and still seems to work.
Yeah, that works, but you're limited to 50 errors, so if you have more than that, there's no way to see just the errors on your PR nor to see them contextually within your files changed. Having the files changed work allows devs to naturally see the linter messages, which means it is more present in a developers workflow (and thus will be more likely to get fixed)
That's correct, this limitation is forced by GitHub. It's recommended to fix all issues first before using a linter action.
That's correct, this limitation is forced by GitHub. It's recommended to fix all issues first before using a linter action.
Right, but even when I fix those errors, it does not show on the files tab.
Do you have an example? https://github.com/wearerequired/lint-action-test/pull/6/files shows them correctly.
Yup, here is a repo I published here: https://github.com/Christian-Oleson/lint-action-test
Where the linter ran successfully with errors found here: https://github.com/Christian-Oleson/lint-action-test/pull/1/checks?check_run_id=12352172533
But the files are not adding annotations on the files tab: UnitTest1.cs
Based on the Check failure on line 7 in lint-action-test\UnitTest1.cs
message I'd say that this is because of the backslash and GitHub seems to expect a forward slash.
Based on the
Check failure on line 7 in lint-action-test\UnitTest1.cs
message I'd say that this is because of the backslash and GitHub seems to expect a forward slash.
Thanks for catching that. I'm not entirely sure I see where it is failing, but I'll trust you've understood it. It sounds like a windows issue for sure though, which is indicative of where I'm see the problem (windows containers).