Giter Site home page Giter Site logo

Parse from stdin about credo HOT 8 CLOSED

rrrene avatar rrrene commented on May 8, 2024
Parse from stdin

from credo.

Comments (8)

rrrene avatar rrrene commented on May 8, 2024

First let me thank you for taking the time to put this together. Using STDIN for this is certainly something useful.

so certain editors can annotate the original file

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.

from credo.

smeevil avatar smeevil commented on May 8, 2024

An example of Spacemacs using it with Flycheck and realtime updating :

image

from credo.

smeevil avatar smeevil commented on May 8, 2024

Just to be clear, which hack are you referring to, the one that prefixes the filename stub ?

from credo.

rrrene avatar rrrene commented on May 8, 2024

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":

  1. The hack I was reffering to was setting the files field in the Config struct during CLI parameter parsing. The module responsible for converting the parameters to source file locations is Credo.Sources. Separating these concerns makes it easier to reason about the system as a whole.
  2. Setting the source files in the Suggest command via a new function get_source_files violated this. And we have 3 commands (suggest, list and explain) that need to be able to get sources from STDIN.
  3. As a general guideline: When contributing to a project, always try to adhere to already present styles, formatting rules etc. This makes it much liklier that a PR gets merged, since the original author does not "trip over" cosmetic inconsistencies when reviewing changes to actual functionality.

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 ๐Ÿ‘

from credo.

smeevil avatar smeevil commented on May 8, 2024

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,
I'll be around and keep an eye on the issue tracker to see if i can help in any way :)

Have a wonderful day !

Gerard.

from credo.

rrrene avatar rrrene commented on May 8, 2024

Hi Gerard,

your changes are part of the latest release - v0.3.6.

Please check if the "STDIN feature" now works to your content. Please also take note that the CLI switch was renamed to --read-from-stdin which is a notch more descriptive.

btw: are you by any chance attending this year's ElixirConf.EU?

from credo.

smeevil avatar smeevil commented on May 8, 2024

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 :)

On 11 Mar 2016, at 23:08, Renรฉ Fรถhring [email protected] wrote:

Hi Gerard,

your changes are part of the latest release - v0.3.6.

Please check if the "STDIN feature" now works to your content. Please also take note that the CLI switch was renamed to --read-from-stdin which is a notch more descriptive.

btw: are you by any chance attending this year's ElixirConf.EU?

โ€”
Reply to this email directly or view it on GitHub.

from credo.

smeevil avatar smeevil commented on May 8, 2024

Sorry for the late reply :/
I tested it out and everything seems to work perfectly :)

Thank you so much :)

Gerard.

from credo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.