Skip to content
This repository has been archived by the owner on Apr 21, 2021. It is now read-only.

Accept stdin as input #193

Closed
smeevil opened this issue Feb 29, 2016 · 4 comments
Closed

Accept stdin as input #193

smeevil opened this issue Feb 29, 2016 · 4 comments

Comments

@smeevil
Copy link
Contributor

smeevil commented Feb 29, 2016

Hi,

For external editors it would be very nice if Dogma would accept source code from stdin.
This will allow for a lot of IDE's to use Dogma as an inline lint-ing tool, for example with Spacemacs and Flycheck. Currently you need to feed Dogma an existing file to lint.

I've been working on a small prove of concept to see if I could make this happen and here is the result :

example

(note the /tmp/test.ex is a dummy value, not an actual file)

Before I dive deeper into this and make everything nice and tidy, I was wondering what you think about this feature and if it has any chance of being merged.

Let me know,

Gerard

@lpil
Copy link
Owner

lpil commented Mar 1, 2016

I didn't see the point in this, but you've given a very good use case here. I'm game. :)

@lpil
Copy link
Owner

lpil commented Mar 1, 2016

Perhaps it should use a special stdin CLI flag? Or another task?

@smeevil
Copy link
Contributor Author

smeevil commented Mar 1, 2016

Cool,

Spend quite some time with it today, and almost have everything nice and tidy.
It is indeed using a new flag.
Will send you a pull request tonight, or maybe earlier if I can sneak some more time in between work :)

Gerard.

@lpil
Copy link
Owner

lpil commented Mar 1, 2016

Thanks Gerard!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants