question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use linter exit code to determine check result

See original GitHub issue

I tried out the rubocop linter in my project and I noticed that when I have warnings: Screen Shot 2020-01-06 at 4 14 32 PM

I still get a green check: Screen Shot 2020-01-06 at 4 14 24 PM

That’s not the way that the typical rubocop setup works, usually those errors would return a non-zero exit code and fail the build. I wouldn’t even know I needed to look for errors unless I click into the Detail screen.

I noticed that here you’re only considering errors in the Check status: https://github.com/samuelmeuli/lint-action/blob/a838ab16415bb1752bb9d77b4ce13fa80bfcaef6/src/github.js#L75

Would you consider failing on warnings as well? Or make that configurable?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
larsklevancommented, Jan 8, 2020

Thank you for the quick fix! I tried it with rubocop in my project and it’s working great.

1reaction
larsklevancommented, Jan 7, 2020

It probably makes sense to use the linter’s exit code to determine the check conclusion

I like this approach. Seems like it would be consistent with the way CI typically works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

lint Source Code Checker - Oracle Help Center
This chapter explans how you can use the lint program to check your C code for errors that may cause a compilation failure...
Read more >
Successful exit code (0) when typecheck error #529 - GitHub
AIf I use v1.16.0 golangci-lint run fails with the compilation errors, but v1.17.X finishes successfully. This is an issue for me when using...
Read more >
Linters | golangci-lint
Name Description Presets Since asasalint ⚙️ check for pass any as any in variadic func(...any) bugs 1.47.0 bidichk ⚙️ Checks for dangerous unicode character sequences...
Read more >
How to get non-zero exit status with lintr::lint() in order to fail a ...
The lintr::lint() function returns results in a list with class "lints" . You have issues if its length is greater than zero, so...
Read more >
Improve your code with lint checks - Android Developers
In the lint Inspection Results window after you click Analyze > Inspect Code. See Manually run inspections. Configure the lint file. You can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found