Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support json output format on argo lint Fixes #14035 #14041

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pakio
Copy link

@pakio pakio commented Dec 31, 2024

Fixes #14035

Motivation

Add new output format, json, to enable easier post-processing of lint result.

Modifications

  • Added new formatter : formatter_json
  • Updated argo lint to allow --output json

Verification

Tested with locally built cli

$ make cli
$ ./dist/argo lint --output json ./examples/*.yaml --offline | jq .

{
  "results": [
    {
      "file": "./examples/archive-location.yaml",
      "errors": [],
      "linted": true
    },
    ...
    {
      "file": "./examples/workflow-of-workflows.yaml",
      "errors": [],
      "linted": true
    }
  ],
  "success": false,
  "anything_linted": true
}

Signed-off-by: Kazuma (Pakio) Arimura <[email protected]>
@pakio pakio changed the title Fixes #14035 feat: Add json output format on argo lint feat: Add json output format on argo lint (Fixes #14035) Dec 31, 2024
@pakio pakio changed the title feat: Add json output format on argo lint (Fixes #14035) feat: Add json output format on argo lint Fixes #14035 Dec 31, 2024
@pakio pakio marked this pull request as ready for review December 31, 2024 16:02
@pakio pakio changed the title feat: Add json output format on argo lint Fixes #14035 feat: Support json output format on argo lint Fixes #14035 Dec 31, 2024
Copy link
Member

@tczhao tczhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, very clean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support standardized output format for argo lint
2 participants