question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add --quiet switch

See original GitHub issue

I’m submitting a…

  • bug report
  • feature request

What is the current behavior?

Running Spectral lint with JSON output and then piping standard output to another program fails because the logging to standard output gets sent along with the JSON output and fails to parse.

For example, imagine an invalid OpenAPI document consisting only of:

openapi: 3.0.1

Running an incredibly simple pipeline like this fails:

$ spectral lint --format=json c.yaml | jq '.[]'                                                    
parse error: Invalid numeric literal at line 1, column 8 

Because stdout looks like this:

Linting c.yaml                                                                        
OpenAPI 3.x detected                                                          
[                                                                                     
        {                                                                             
                "code": "info-contact",   

What is the expected behavior?

Standard output with JSON output should be parseable so that spectral can be used in scripts.

What is the motivation / use case for changing the behavior?

Using Spectral in a script. It is possible to work around this by dumping the JSON to a temp file with -o, but that complicates some scripts.

Please tell us about your environment:

  • Version: 2.1.0
  • Framework: [ ]
  • Language: [all]
> $ spectral --version
@stoplight/spectral/2.1.0 linux-x64 node-v10.12.0

Other information

N/A

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lag-of-deathcommented, Jun 10, 2019

This is now in progress

1reaction
philsturgeoncommented, May 17, 2019

I think this is more of a feature request for a --quiet switch. It’s helpful for some output to happen by default because it acts as a guide for people who are still learning how the tool works. There is --verbose which gets way more chatty, so we can add --quiet which does nothing at all. This is fairly standard with things like apt-get being shushed with -y instead of asking for stdin yes/no, etc.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Complete Guide to MSI Switches for Silent Software ...
The Complete Guide to MSI Switches for Silent Software Installation ... Those pairs might identify an install folder, or add a license key,...
Read more >
Command line switches supported by Self-Extractor packages
Describes the command line switches supported by a software installation package, ... /quiet, Runs the package in silent mode.
Read more >
5 ways to find silent install parameters - PDQ
2. Use Google to find silent install parameters ... This information is usually pretty easy to find for most mainstream applications. However, ...
Read more >
How to deploy MSI which has no silence install switch?
Silent installation is a built-in feature of Windows Installer and should work for all MSI files (unless actively blocked by modifications ...
Read more >
Unattended/Silent Installation Switches for Windows Apps
Of course, you can try running the installer with the /? switch to find out which other switches it supports. But if you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found