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

Embrace parseable output to stdout #74

Closed
webknjaz opened this issue Oct 24, 2018 · 4 comments
Closed

Embrace parseable output to stdout #74

webknjaz opened this issue Oct 24, 2018 · 4 comments

Comments

@webknjaz
Copy link
Contributor

It is common to print smth parseable for the sake of pipe chaining among POSIX utils.
However, ansible-review doesn't seem to care about this:

✦ ➜ ansible-review rebuild-world.yml -q 1>/dev/null
Couldn't parse task at rebuild-world.yml:8 (no action detected in task. This often indicates a misspelled module name, or incorrect module path.

The error appears to have been in '<unicode string>': line 8, column 5, but may
be elsewhere in the file depending on the exact syntax problem.

(could not open file to display line))
{ 'eix': {'__file__': 'rebuild-world.yml', '__line__': 9, 'action': 'sync'},
  'name': 'Sync portage/layman trees and index ebuilds'}

I'm building a GitHub App integration demo, which would really benefit from not having to use heuristics and manual conditional parsing to retrieve structured result data.

@webknjaz
Copy link
Contributor Author

@willthames ?

@webknjaz
Copy link
Contributor Author

@willthames
Copy link
Owner

If there is a PR that would fix this, let me know. I've had a rereview of #28 but that needs a rebase and I'm still not convinced by the custom option parser.

@webknjaz
Copy link
Contributor Author

Yeah, I'm also not sure whether that solution is a good fit.
OTOH I'd probably prefer just one switch to emit everything as JSON or similar, maybe JSONL.

The problem is that I don't know whether it needs architectural changes to unify output format as well.
And I also think that for my purposes using Python API would be even better which would probably require a slight change like putting some chunk of logic from main() into its separate function.

@webknjaz webknjaz closed this as not planned Won't fix, can't repro, duplicate, stale Sep 17, 2024
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

No branches or pull requests

2 participants