sitespeedio / coach

Clear Eyes. Full Hearts. Can’t Lose.
MIT License
1.21k stars 64 forks source link

(NPM) webcoach -f json doesnt return complete valid json #324

Closed kev2718 closed 5 years ago

kev2718 commented 5 years ago

I am using webcoach@3.0.0 and node@10.14.2. After using webcoach https://www.sitespeed.io -f json I get following result:

[2018-12-12 11:52:45] INFO: Testing url https://www.sitespeed.io iteration 1 [2018-12-12 11:52:48] INFO: 8 requests, 123.58 kb { "advice": { "accessibility": { "adviceList": { "altImages": { "advice": "", "description": "All img tags require an alt attribute. This goes without exception. Everything else is an error. If you have an img tag in your HTML without an alt attribute, add it now. https://www.marcozehe.de/2015/12/14/the-web-accessibility-basics/", "id": "altImages", "offending": [ ], "score": 100, "tags": [ "accessibility", "images" ], "title": "Always use an alt attribute on image tags", "weight": 5 }, ...

Is this a bug, that the first two lines are showing up in the result? Because of them I cannot use the json result to create an array for example. Or is there an additional parameter to not listing the first two lines?

Thanks in advance kev2718

PS: greetings from germany we love sitespeed and coach :+1: :heart:

soulgalore commented 5 years ago

Hi @kev2718 yep seems like the log isn't silent. I think you can use --output until it's fixed

Best Peter

kev2718 commented 5 years ago

Hi @soulgalore , thanks for your answer. This works fine for me :)

Best, Kevin