Skip to content

Comments

Add json output format to check#24

Merged
martinemde merged 7 commits intomainfrom
martinemde/srkpxtkmqznx
Jan 6, 2026
Merged

Add json output format to check#24
martinemde merged 7 commits intomainfrom
martinemde/srkpxtkmqznx

Conversation

@martinemde
Copy link
Contributor

@martinemde martinemde commented Dec 17, 2025

This change adds a json output option and provides a schema to describe the output format. The goal is to be able to programmatically parse the output of pks check for other tools like danger.

We decided to split the idea of a stale todo from the idea of a violation, since even though they talk about the same idea, the have different meanings.

  • A stale todo is a leftover reference to a problem that no longer exists. The fix requires no work other than running pks update. It's a lint warning.
  • A violation should be address via a choice by the developer to either repair the violation, change the package config, or add it to the todo.

Copy link
Contributor

@ivy ivy 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 to me outside of a design detail: I think we should exit with a non-zero status code when there are violations.

Also suggested a doc comment to point readers/agents to the JSON schema. Love that you added a test that validates against it! 💜

@martinemde martinemde force-pushed the martinemde/kkpvkpnwpymy branch from ef59b76 to 165a8da Compare December 17, 2025 21:48
@martinemde martinemde force-pushed the martinemde/srkpxtkmqznx branch from 270ac28 to b722534 Compare December 18, 2025 01:33
@martinemde martinemde force-pushed the martinemde/srkpxtkmqznx branch from b722534 to 06e880a Compare January 6, 2026 18:26
Base automatically changed from martinemde/kkpvkpnwpymy to main January 6, 2026 18:28
martinemde and others added 4 commits January 6, 2026 10:30
Validate against the included schema for check json output

Co-authored-by: Ivy Evans <ivy.evans@gusto.com>
This follows the convention used by linters like eslint, rubocop, and shellcheck.
Builds on clap's existing behavior.

All output formats (packwerk, json, csv) behave consistently:
- Exit 0 when no violations
- Exit 1 when violations found
- Exit 2 on internal errors
Co-authored-by: Ivy Evans <ivy@ivyevans.net>
@martinemde martinemde force-pushed the martinemde/srkpxtkmqznx branch from 8a26012 to b04193f Compare January 6, 2026 18:31
@martinemde martinemde self-assigned this Jan 6, 2026
@martinemde martinemde marked this pull request as ready for review January 6, 2026 18:42
Copy link
Contributor

@hellosweta hellosweta left a comment

Choose a reason for hiding this comment

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

🏄

@martinemde martinemde merged commit 26b6753 into main Jan 6, 2026
7 checks passed
@martinemde martinemde deleted the martinemde/srkpxtkmqznx branch January 6, 2026 18:52
@github-project-automation github-project-automation bot moved this from Triage to Done in Modularity Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants