-
Notifications
You must be signed in to change notification settings - Fork 89
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
helpers/factory: default formatter valid exit code to 0 #221
Conversation
@mochaaP I can't assign reviewers so please take a look. I know I need to squash commits and a bunch of other stuff but I just wanted to draft the initial API. Let me know everything that can be improved. |
@mochaaP I'm going to start going through the formatters one-by-one (pain) to ensure I'm passing the right exit code.
|
I think (2) is fine. For (1), we could land the changes first and wait for feedback from ones who actually use them if any problem arises. |
Ready for review. |
@mochaaP addressing both comments above: The problem I have with moving the code to the generic factory (and this includes the code duplication comment above) is that I thought this feature only makes sense for formatters. If we added this to generator factory, wouldn't we also be checking linting exit codes as well? |
@mochaaP this is ready for review, see above comments |
What does the eyes emoji mean 😭 I've already addressed the comments I thought... what do you think? (lol) |
“I will take a look at it” 😂 This needs some slight changes, I will take care of it. |
Do you think this implementation is okay? |
@mochaaP you updated the logging message to use Then you deleted the file containing that change ( If this is the case, I thought we had to separate the logic out in another file to do that log... because only in the formatters does the notion of validating the exit code make sense. Sorry this is taking so long, LMK if you know what I'm saying. |
ack, will check tonight. |
LGTM! |
…tools#221)" This reverts commit cc810f7.
@mochaaP @barrett-ruth 2025-01-09.12-19-02.mp4before: 2025-01-09.12-19-43.mp4 |
cc @barrett-ruth is prettierd outputting to stdout? we might need to ignore that |
Found myself here because I updated none-ls and keep getting the error The error output itself is rather annoying, so for now my solution is to pin none-ls to commit 83c7c00. Edit: Ok, I just spotted #237 which has the same changes I concluded on after exploring the traceback. |
I've partially reverted this until I figure out a better way to present the error message. |
Resolves #216.
Warns on formatter failures, defaulting to
!= 0
.Create a utility wrapper
helpers.check_exit_code
to maintain backwards compatibility.TODO
logger:warn
spawns a blocking notification (i.e. must press enter) and creates a timeout error if not pressed within the defualt timeout^ this is unavoidable - addressed by using a shorter initial message pointing you to to the log file.