-
Notifications
You must be signed in to change notification settings - Fork 65
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
make format of fixit's terminal output configurable #437
Conversation
Hi @jvllmr! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
First off, I greatly appreciate the PR, thank you! That said, I have some concerns with the current design. I'm not fond of passing the original config object back for every single result, for a few reasons:
Instead, I think what would make most sense is to pull the config for the current working directory in the CLI module, and then pass the relevant output format straight to On the actual config mechanism, I think rather than enabling this as a free-form text field (which I suspect would be overly complicated for 99% of use cases), a set of "named" formats would be better. Eg, A standardized JSON result could be defined with Given the popularity of VS Code and the utility of the vscode-compatible format, perhaps it would be worth discussing a plan to make that the default format style in a future release. Ie, implement the selectable output format and maintain the current default, with a "vscode" format style, and set a target for a future date or release version where the "vscode" style will become the default. I suspect that will make more folks happy in the long run. I'm happy to make most of these proposed design changes if you'd prefer to not spend more time on it. Let me know, and I'll be sure to preserve author credit for you on any changes I make. |
Thanks for the very detailed feedback and I see your point. I'd like to try integrating your suggestions myself. I'll probably find some time to work on this next weekend. |
I don't think the JSON format needs to be included in this PR, but mentioned it more for context in the overall design direction. Happy to worry about a JSON format in a different PR or later in the future. Cheers! |
I adjusted the PR according to your suggestions. There surely is room for improvement. Especially for the tests. But I first want to check with you if the general idea is correct. |
hey @amyreese any thoughts on his pr? would be great to have the choice of a colon instead of an @ so it works better with code editors when jumping to lines |
Sorry, just been trying to find the time to do a full review on the new revisions. I will try to get to it soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Reworked the data types to just use an enum, and to deduplicate the config handling and reuse the existing loader.
- Added a handful of extra test cases.
- Updated and reworded docs, added note on future plans.
Overall very happy with where this is now. Added a TODO to implement the JSON output mode at some point in the future.
@jvllmr thank you for your help on this feature. It is very much appreciated and will go out with the next feature release (hopefully soon™). 💜 |
Summary
This PR makes the format of Fixit's output configurable.
I hope I got everything right 😸
fixes #397
closes #305