Add JSON output format to 'pdk validate' #1006
Unanswered
natemccurdy
asked this question in
Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Use Case
I use
pdk
in git hooks and CI systems to validate Puppet changes. Right now, I have to do string parsing of the stdout ofpdk validate
or output in junit XML. String parsing is not sustainable, and XML is... well, XML.JSON is supported by all of the native tooling and languages I use, and parsing it is very easy.
Describe the Solution You Would Like
pdk validate --format=json
This command should output the results of
pdk validate
to STDOUT as a JSON blob.Ideally, there'd be a JSON spec that the output conforms to.
The JSON blob should contain information you'd expect to see in a code review. The exact schema is TBD, but at a minimum, these come to mind:
Describe Alternatives You've Considered
Tried string parsing the stdout, but this is entirely unmaintainable as programs update and stdout evolves.
Tried Junit XML, but this is a very specific format of XML designed for the Java world. Using it feels like stepping back in time, and not in a good way.
Beta Was this translation helpful? Give feedback.
All reactions