codeclimate / codeclimate-swiftlint

Code Climate Swiftlint engine
MIT License
1 stars 2 forks source link

Invalid JSON errors #5

Closed larkinscott closed 6 years ago

larkinscott commented 6 years ago

Came across this invalid JSON errors while testing. Tested this repo as it was (didn't add a .codeclimate.yml config) using CODECLIMATE_DEBUG=1 codeclimate analyze --dev -e <image-name>.

https://github.com/xmartlabs/Eureka

D, [2018-03-08T20:10:26.055867 #1] DEBUG -- : engine stdout:
    {
    "categories": [
      "Style"
    ],
    "check_name": "Vertical Whitespace",
    "description": "Limit vertical
    W, [2018-03-08T20:10:26.056922 #1]  WARN -- : killing container name=cc-engines-swiftlint-sl1-6c356947-de68-4e13-bb44-988f961504e1 message="output invalid"
    I, [2018-03-08T20:10:26.112894 #1]  INFO -- : finished engine swiftlint
    error: (CC::CLI::Analyze::EngineFailure) engine swiftlint failed with status 99 and stderr
    engine produced invalid output: {:message=>"Invalid JSON", :output=>"\n{\n  \"categories\": [\n    \"Style\"\n  ],\n  \"check_name\": \"Vertical Whitespace\",\n  \"description\": \"Limit vertical "}
    D, [2018-03-08T20:10:26.114531 #1] DEBUG -- : backtrace: /usr/src/app/lib/cc/analyzer/raising_container_listener.rb:23:in `finished'
    /usr/src/app/lib/cc/analyzer/composite_container_listener.rb:13:in `block in finished'
    /usr/src/app/lib/cc/analyzer/composite_container_listener.rb:13:in `each'
    /usr/src/app/lib/cc/analyzer/composite_container_listener.rb:13:in `finished'
    /usr/src/app/lib/cc/analyzer/bridge.rb:52:in `block (2 levels) in run'
    /usr/src/app/lib/cc/analyzer/formatters/plain_text_formatter.rb:63:in `with_spinner'
    /usr/src/app/lib/cc/analyzer/formatters/plain_text_formatter.rb:41:in `block in engine_running'
    /usr/src/app/lib/cc/analyzer/formatters/formatter.rb:31:in `engine_running'
    /usr/src/app/lib/cc/analyzer/formatters/plain_text_formatter.rb:40:in `engine_running'
    /usr/src/app/lib/cc/analyzer/bridge.rb:37:in `block in run'
    /usr/src/app/lib/cc/analyzer/bridge.rb:34:in `each'
    /usr/src/app/lib/cc/analyzer/bridge.rb:34:in `run'
    /usr/src/app/lib/cc/cli/analyze.rb:36:in `run'
    /usr/src/app/lib/cc/cli/command.rb:73:in `execute'
    /usr/src/app/lib/cc/cli/runner.rb:25:in `run'
    /usr/src/app/lib/cc/cli/runner.rb:9:in `run'
    /usr/src/app/bin/codeclimate:12:in `<main>'
notorca commented 6 years ago

Fixed in https://github.com/codeclimate/codeclimate-swiftlint/commit/932cbdbd89b4a8a461048abd6e27acdbcb4bc32e