Skip to content

freshactions/json-syntax-check

 
 

Repository files navigation

json-syntax-check

Simple JSON syntax checker

OK case test passing NG case test passing rubocop passing

Ruby 3

Inputs

pattern

Required file pattern to check syntax. Default is '\\.json$'.

Environment variables

BASE

Optional base directory in which to look for files matching pattern.

If BASE is not set, json-syntax-check will look in GITHUB_WORKSPACE.

Outputs

failed_files

File names whose syntax check failed in JSON list format.

Example

Your .github/workflows/jsoncheck.yml may look like:

name: JSON check

on:
  push:
    paths:
      - '**.json'
  pull_request:

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: json-syntax-check
        uses: limitusus/json-syntax-check@v2
        with:
          pattern: "\\.json$"

About

Simple JSON syntax checker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 80.4%
  • Dockerfile 12.9%
  • Makefile 6.7%