Skip to content
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

Making flow check result prettier and easier to read #768

Closed
coodoo opened this issue Sep 1, 2015 · 5 comments
Closed

Making flow check result prettier and easier to read #768

coodoo opened this issue Sep 1, 2015 · 5 comments

Comments

@coodoo
Copy link

coodoo commented Sep 1, 2015

Currently flow check results looks like this, which is a bit hard to read and understand what the error really is:

/Users/folder/zzz.js:14:2,11: 
class property initializers are not yet supported

/Users/folder/zzz.js:22:9,24: function call
Error:
/Users/folder/zzz.js:22:14,15: number
This type is incompatible with
/Users/folder/zzz.js:7:19,24: string

Found 2 errors

Wouldn't it be nicer to be like this:

Created: Tue Sep 01 2015 19:37:14 GMT+0800 (CST)
Total Errors: 2

Error:
  /Users/folder/zzz.js, line 14
  t1 = '00';
  ↑ class property initializers are not yet supported

Error:
  /Users/folder/zzz.js, line 22
  var k = foo( 33, 'a22' );
               ↑ expecting "string", got "number"

  From:
    /Users/folder/zzz.js, line 7
    function foo( bar:string, coo:number ):Array<string> {

I've built a simple parser in javascript to do just that, but thought it would be a really nice feature out of the box.

As a side note, I might go ahead and build a plugin for sublime text editor so that errors can be marked inline and a popup will show up when mouse hover over it, à la mode most IDEs out there (ie: Eclipse, Visual Studio).

@nmn
Copy link
Contributor

nmn commented Sep 1, 2015

@coodoo I was thinking of doing a sublime linter myself, but my python isn't great. I currently work on linter-flow-plus for atom (I will also update linter-flow as well)

@coodoo
Copy link
Author

coodoo commented Sep 2, 2015

Sounds good, please keep me posted if you do decide to go ahead and build that, thanks.

@coodoo
Copy link
Author

coodoo commented Sep 2, 2015

I went ahead and created flowery which runs as a CLI and API tool.

@samwgoldman
Copy link
Member

@coodoo This is very cool!

@nmn
Copy link
Contributor

nmn commented Sep 2, 2015

@coodoo I'm reading the SublimeLinter documentation trying to make sense of it all. My python is really quite rusty.

But linter-flow-plus supports error + trace, the same way that flowery does. Using the --json flag on flow helps a lot.

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

No branches or pull requests

3 participants