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

See linter warnings as warnings on CodeFactor (ESLint) #62

Closed
Jxlle opened this issue Feb 19, 2024 · 6 comments
Closed

See linter warnings as warnings on CodeFactor (ESLint) #62

Jxlle opened this issue Feb 19, 2024 · 6 comments

Comments

@Jxlle
Copy link

Jxlle commented Feb 19, 2024

Currently, it seems that linter rules that serve as a warning, and not an error, are also reported as an issue in CodeFactor. When using CodeFactor as a PR check, it blocks the PR, even if all errors are resolved but there are still warnings.

Is there a way to classify linter warnings as non-blocking issues on PR's?

@cordis-dev
Copy link
Contributor

@Jxlle thanks for reporting. Could you give an example PR where this is the case? CodeFactor has several issue severities, I want to make sure that warnings are mapped properly.

@Jxlle
Copy link
Author

Jxlle commented Feb 19, 2024

@cordis-dev We use Cypress for E2E testing and also use their ESLint plugin (eslint-plugin-cypress npm package) to check for errors/warnings. We enabled two Cypress rules:

  • "cypress/no-unnecessary-waiting": "warn"
  • "cypress/unsafe-to-chain-command": "warn"

but these warnings are reported as 'issues' when CodeFactor checks the PR, making the check fail. You can actually see the second rule turned off in our config in this issue with the comment that CodeFactor makes the PR fail if these rules are violated (and thus generate warnings).

The repository is private so I don't know whether to email you guys via your contact email about this to see PR's in detail? The PR has been updated since then though so the CodeFactor details only show the latest PR issues, but the original GitHub action just shows 'x issues found'

@cordis-dev
Copy link
Contributor

@Jxlle thanks for the feedback. We've added an option on repository Settings page to change behavior for Minor Issues (warnings) which is related to Pull Request Checks:

image

If you toggle it to On it should no longer block PR checks if all reported issues are minor (warnings).

@Jxlle
Copy link
Author

Jxlle commented Feb 21, 2024

Hi @cordis-dev, I'll test this asap! (after #64 is also resolved)

@Jxlle
Copy link
Author

Jxlle commented Feb 22, 2024

@cordis-dev This update seems to work, thanks!

Note on user interface: I'm not sure, but do the issues (warnings & errors) get separated in the dashboard at this time? Seemed to me that they all were classified as issues. Would be nice to have it display 'issues' and 'minor issues' as separate labels in a future update and filter between them. (maybe have minor issues in orange instead of red?)

@cordis-dev
Copy link
Contributor

cordis-dev commented Feb 29, 2024

@Jxlle glad to help.

Regarding UI for issues, we're considering adding a Severity filter for issue search to address this. Currently you can see severity indication icon as part of issue info at the header:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants