You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

yaml-config-lint

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yaml-config-lint

Lint multiline json config in yaml files


Version published
Weekly downloads
624
increased by91.41%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

YAML Config Lint

Lint multiline json config in yaml files

Installation

npm

npm i -g yaml-config-lint

Usage

Lint multiline data inside YAML files

USAGE
  $ ycl

OPTIONS
  -f, --files=files  (required) Input File(s)
  -h, --help         show CLI help
  -k, --keys=keys    (required) Keys you want to validate
  -v, --version      show CLI version
  • -f can be a file name or a glob pattern
  • -k is the key in the yaml data whose content you want to lint, nested keys can be selected by using .

For Example

// pokemon.yaml

apiVersion: v1
kind: ConfigMap
metadata:
  name: game-demo
data:
  pokemon: |
    {
      "ability": {
        "name": "imposter",
        "url": "https://pokeapi.co/api/v2/ability/150/"
      },
      "is_hidden": true,
      "slot": 3
    }   
$ ycl -k data.pokemon -f pokemon.yaml
Running YAML Config Lint:

✅ jsonlint successful: pokemon.yaml

In case of incorrect JSON like this

// pokemon.yaml

apiVersion: v1
kind: ConfigMap
metadata:
  name: game-demo
data:
  pokemon: |
    {
      "ability"
        "name": "imposter",
        "url": "https://pokeapi.co/api/v2/ability/150/"
      },
      "is_hidden": true,
      "slot": 3
    }   
$ ycl -k data.pokemon pokemon.yaml
Running YAML Config Lint:

jsonlint error in: pokemon.yaml
Parse error on line 2:
{  "ability"    "name": "imposter",
----------------^
Expecting 'EOF', '}', ':', ',', ']', got 'STRING'

Keywords

FAQs

Package last updated on 11 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc