-
Notifications
You must be signed in to change notification settings - Fork 418
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
Parse from stdin #49
Comments
First let me thank you for taking the time to put this together. Using STDIN for this is certainly something useful.
Which editors are these? I am asking because the hack in the PR to make this work is really something I would like to avoid. |
Just to be clear, which hack are you referring to, the one that prefixes the filename stub ? |
Maybe "hack" was a bit harsh. Sorry, it was late and was a bit grumpy. 😞 To clarify, please take a look at this branch, where I merged your commits and made some changes to better fit the "bigger picture":
That said, I personally hate it when people are super nitpicky about PRs and ask you to modify white-space or other trivial parts of your commits. Therefore I merged the changes into the above mentioned branch and will merge that integration branch into master soon! Your input to this project was already very valuable and I sincerely hope that the above "lecture" does not stop you from contributing more 👍 |
No worries :D yeah, I agree it was a bit invasive to set the files option like that but had no other idea at the moment on how to accomplish it otherwise. I really like the way you handle this. There are indeed a lot of people that are very picky about their pull requests which, at least for me, takes away all the enthusiasm and excitement to help with those projects. For me personally a pull request is more a prove of concept. I've had an idea which might be really useful for others as well which i'll try to incorporate as best as i can with the limited knowledge of the existing code base, but when you are new to a piece of code, you have no idea what the details are. In that case i'll try to prove my solution and how it works as best as i can. For the maintainer it should be quite clear what the proposed suggestion and result should be, but as he/she does have a mental map of the original code base, its blatantly clear that the new code is invasive and can be handled in a much nicer way. With the given information he/she should be able to quickly refactor it and incorporate the new functionality, as you did :) In the end, all that matters to me, is that the intended behaviour is adopted and working, not necessarily by using my code verbatim :) I just started out with Elixir about 3 months ago and switched to Spacemacs about two weeks ago. The switching to Spacemacs (and with it, coincidentally, evil-mode, which i should have done like 20 years ago...but thats besides the point) opens up a lot of new experiences and opportunities to spot missing behaviour or tools and lear about new ones. This prompted me to try and incorporate Credo into Flycheck :) Anyways, Have a wonderful day ! Gerard. |
Hi Gerard, your changes are part of the latest release - Please check if the "STDIN feature" now works to your content. Please also take note that the CLI switch was renamed to btw: are you by any chance attending this year's ElixirConf.EU? |
Hi, Great to hear , will let you know if it works. Regarding elixir conf, would have loved to, but a day later is WGT festival in Leipzig. This is something I always look forward to and have been going there every year since the last 15 years :) (http://www.wave-gotik-treffen.de/english/bands.php). Let me know if you are ever in NL though so we can catch some beers :)
|
Sorry for the late reply :/ Thank you so much :) Gerard. |
Hi,
I would like to suggest to allow Credo to parse source from stdin.
The reasoning behind this is that it would make it easier for editors to make use of Credo.
For example with Spacemacs and Flycheck.
I know its possible to use it with Flycheck at the moment, but it requires the file to be saved. If you use continues flychecking it will thus also continuous safe the file either in the original or make a temp file to pass along to Credo to let it do its job.
If we can pass the buffer's contents from Spacemacs directly to Credo via stdin, we can bypass the saving/creation of temp files.
I've already create a pull request supporting this behaviour where you can use it as follows.
Just passing in source via stdin :
Passing in source via stdin and using a filepath to map:
Do note with the last option passed as filename is a stub that is just used to prefix the error so certain editors can annotate the original file.
You can find the pull request here : #50
The text was updated successfully, but these errors were encountered: