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

Disabled opt-in rule warning violates json contract #2817

Closed
2 tasks done
rounak opened this issue Jul 19, 2019 · 2 comments
Closed
2 tasks done

Disabled opt-in rule warning violates json contract #2817

rounak opened this issue Jul 19, 2019 · 2 comments

Comments

@rounak
Copy link
Contributor

rounak commented Jul 19, 2019

New Issue Checklist

Describe the bug

Using the json reporter when linting prints output that's not json.

command: ./Pods/SwiftLint/swiftlint lint --reporter json --quiet

output:

Found a configuration for 'modifier_order' rule, but it is disabled on 'disabled_rules'.
[
    {

The warning introduced with #1350 breaks the output from following the standard json schema.

Complete output when running SwiftLint, including the stack trace and command used
$ ./Pods/SwiftLint/swiftlint lint --reporter json --quiet

Environment

  • SwiftLint version (run swiftlint version to be sure)? 0.33.1
  • Installation method used (Homebrew, CocoaPods, building from source, etc)? Cocoapods
  • Which Xcode version are you using (check xcode-select -p)? 10.1.0
@marcelofabri
Copy link
Collaborator

marcelofabri commented Jul 19, 2019

That message should be printed to stderr, while the json should be printed to stdout. You can append 2>/dev/null to omit the stderr output.

@rounak
Copy link
Contributor Author

rounak commented Jul 28, 2019

Thank you!

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