Skip to content

limitusus/json-syntax-check

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

36b1f74 · Oct 29, 2024

History

36 Commits
Jun 1, 2023
Nov 30, 2020
Oct 28, 2020
Oct 28, 2020
Oct 20, 2022
Oct 20, 2022
Oct 20, 2022
Dec 1, 2020
Oct 29, 2024
Oct 28, 2020
Oct 28, 2020
Jun 1, 2023
Nov 27, 2020
Oct 20, 2022

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$"