See linter warnings as warnings on CodeFactor (ESLint)
Jxlle opened this issue · 6 comments
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?
@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.
@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
'
@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:
If you toggle it to On
it should no longer block PR checks if all reported issues are minor (warnings).
Hi @cordis-dev, I'll test this asap! (after #64 is also resolved)
@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?)
@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: