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

Linter shows failure, and files which failed linting, but is not making comments on the code in the files via of the PR #608

Open
Christian-Oleson opened this issue Mar 1, 2023 · 12 comments
Labels
bug Something isn't working

Comments

@Christian-Oleson
Copy link

Christian-Oleson commented Mar 1, 2023

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:
#606**

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"
@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot added the stale label Mar 17, 2023
@Christian-Oleson
Copy link
Author

This should not be closed since there is yet to be a response.

@github-actions github-actions bot removed the stale label Mar 18, 2023
@ocean90
Copy link
Member

ocean90 commented Mar 21, 2023

Hello there, can you further explain how #606 is related to this? Could this be a duplicate of #577?

@Christian-Oleson
Copy link
Author

This is not related. I'll try to provide more details. Right now, when I use this action, I can see the action run:
image
When you look at the details, you can see annotations there:
image
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

@ocean90
Copy link
Member

ocean90 commented Mar 21, 2023

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.

@Christian-Oleson
Copy link
Author

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)

@ocean90
Copy link
Member

ocean90 commented Mar 21, 2023

That's correct, this limitation is forced by GitHub. It's recommended to fix all issues first before using a linter action.

@Christian-Oleson
Copy link
Author

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.

@ocean90
Copy link
Member

ocean90 commented Mar 24, 2023

Do you have an example? https://github.com/wearerequired/lint-action-test/pull/6/files shows them correctly.

@Christian-Oleson
Copy link
Author

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

@ocean90
Copy link
Member

ocean90 commented Mar 30, 2023

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.

@ocean90 ocean90 added the bug Something isn't working label Mar 30, 2023
@Christian-Oleson
Copy link
Author

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants