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

Support for JSON output #890

Closed
danieleformichelli opened this issue Mar 30, 2021 · 3 comments
Closed

Support for JSON output #890

danieleformichelli opened this issue Mar 30, 2021 · 3 comments
Labels
enhancement fixed in develop bug/feature resolved in the develop branch

Comments

@danieleformichelli
Copy link
Contributor

Hello 👋
At the moment I think it is not possible to configure the swiftformat --lint output format.
Having the output in a more dev friendly format, would help when the output of the command need to be parsed (e.g. to report errors in CI).

Could you please let confirm that it is currently not supported?
Do you think it is a feature that could be added in the future?

For example, swiftlint can be executed as:

swiftlint lint  --reporter json

to obtain the warning and errors in JSON format, which can then be easily parsed to retrieve the list of warnings and errors.

Thank you,
Daniele

@nicklockwood
Copy link
Owner

@danyf90 SwiftFormat doesn't currently have a JSON output option. It would be fairly easy to add.

@danieleformichelli
Copy link
Contributor Author

@nicklockwood I have tried to implement the support here, let me know if you have any question 🙌

@nicklockwood nicklockwood added the fixed in develop bug/feature resolved in the develop branch label Apr 17, 2021
@nicklockwood
Copy link
Owner

@danyf90 landed in 0.48.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement fixed in develop bug/feature resolved in the develop branch
Projects
None yet
Development

No branches or pull requests

2 participants