Skip to content

Add --json to devcheck why - #6

Open
dbdefault wants to merge 3 commits into
iihao:mainfrom
dbdefault:fix/why-json
Open

dbdefault wants to merge 3 commits into
iihao:mainfrom
dbdefault:fix/why-json

Conversation

@dbdefault

Copy link
Copy Markdown

Resolves #3

Add --json to devcheck why for scripting:

  • PortExplanation now conforms to Codable (all properties already Codable)
  • devcheck why <port> --json / -j prints a stable JSON object:
    {
      "port": 5000,
      "holders": [{ "pid": 804, "command": "ControlCenter", ... }],
      "notes": ["Port 5000 is macOS AirPlay Receiver …"],
      "suggestions": ["Turn it off in System Settings …"]
    }
  • Plain (human) output is unchanged
  • Added test asserting JSON shape for a known port
  • Updated usage help to document --json on why

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.

Add --json to why for scripting

1 participant