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

Added an option to let dogma parse source from stdin #194

Closed
wants to merge 4 commits into from

Conversation

smeevil
Copy link
Contributor

@smeevil smeevil commented Mar 1, 2016

This pull request will enable dogma to parse source from stdin.
see discussion : #193

def version, do: @version

defp read_from_stdin(source \\ "") do
case IO.read(:stdio, :line) do
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an argument to read entirely to EOF in one go?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking to read the source in one go so its easier to add a check later to detect if the source is valid before we hand it off for parsing ?

@lpil
Copy link
Owner

lpil commented Mar 2, 2016

How might we be able to test this?

@smeevil
Copy link
Contributor Author

smeevil commented Mar 2, 2016

I have no idea how to test it.... :/
All I can say is , it does work when using it.

@obmarg
Copy link
Sponsor

obmarg commented Mar 4, 2016

Just an idea, but maybe this could be generalised a bit so that dogma supported reading from files passed on the command line, with stdin being a special type of file. That way you could test most of this change by passing it some files. Might not fully test the stdin case - but it should only be a line or two of difference.

@kthelgason
Copy link
Contributor

kthelgason commented May 28, 2016

Any update on this PR @smeevil ? If you need any help I'd be glad to jump in. I'm trying to land this so as to improve dogma support in Emacs' flycheck.

@smeevil
Copy link
Contributor Author

smeevil commented May 28, 2016

@kthelgason I would be very happy if you could jump in :) after using spacemacs for about two months, I reverted back to the Intelli-J lineup of IDE's since I missed the deeper code integration / analyzation and other tools.

@lpil lpil closed this Feb 23, 2017
@lpil
Copy link
Owner

lpil commented Feb 23, 2017

I'm closing this due to inactivity. Reopen if you want to continue with this :)

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

Successfully merging this pull request may close these issues.

None yet

4 participants