fazibear/codeclimate-credo

Credo analysis failing in Code Climate - 08/23

Closed this issue · 11 comments

  • User is seeing the following output from the Credo engine:
Error:
%BadStructError{struct: Credo.Execution,
 term: %Credo.ConfigFile{check_for_updates: true,
  checks: [{Credo.Check.Consistency.ExceptionNames},
   {Credo.Check.Consistency.LineEndings},
   {Credo.Check.Consistency.ParameterPatternMatching},
   {Credo.Check.Consistency.SpaceAroundOperators},
   {Credo.Check.Consistency.SpaceInParentheses},
   {Credo.Check.Consistency.TabsOrSpaces},
   {Credo.Check.Design.AliasUsage, [priority: :low]},
   {Credo.Check.Design.DuplicatedCode, [excluded_macros: []]},
   {Credo.Check.Design.TagTODO, [exit_status: 2]},
   {Credo.Check.Design.TagFIXME}, {Credo.Check.Readability.FunctionNames},
   {Credo.Check.Readability.LargeNumbers},
   {Credo.Check.Readability.MaxLineLength, [priority: :low, max_length: 80]},
   {Credo.Check.Readability.ModuleAttributeNames},
   {Credo.Check.Readability.ModuleDoc}, {Credo.Check.Readability.ModuleNames},
   {Credo.Check.Readability.ParenthesesOnZeroArityDefs},
   {Credo.Check.Readability.ParenthesesInCondition},
   {Credo.Check.Readability.PredicateFunctionNames},
   {Credo.Check.Readability.PreferImplicitTry},
   {Credo.Check.Readability.RedundantBlankLines},
   {Credo.Check.Readability.StringSigils},
   {Credo.Check.Readability.TrailingBlankLine},
   {Credo.Check.Readability.TrailingWhiteSpace},
   {Credo.Check.Readability.VariableNames},
   {Credo.Check.Readability.Semicolons},
   {Credo.Check.Readability.SpaceAfterCommas},
   {Credo.Check.Refactor.DoubleBooleanNegation},
   {Credo.Check.Refactor.CondStatements},
   {Credo.Check.Refactor.CyclomaticComplexity},
   {Credo.Check.Refactor.FunctionArity}, {Credo.Check.Refactor.LongQuoteBlocks},
   {Credo.Check.Refactor.MatchInCondition},
   {Credo.Check.Refactor.NegatedConditionsInUnless},
   {Credo.Check.Refactor.NegatedConditionsWithElse},
   {Credo.Check.Refactor.Nesting}, {Credo.Check.Refactor.PipeChainStart},
   {Credo.Check.Refactor.UnlessWithElse},
   {Credo.Check.Warning.BoolOperationOnSameValues},
   {Credo.Check.Warning.IExPry}, {Credo.Check.Warning.IoInspect},
   {Credo.Check.Warning.LazyLogging},
   {Credo.Check.Warning.OperationOnSameValues},
   {Credo.Check.Warning.OperationWithConstantResult},
   {Credo.Check.Warning.UnusedEnumOperation},
   {Credo.Check.Warning.UnusedFileOperation}, {...}, ...], color: true,
  files: %{excluded: [~r/\/_build\//, ~r/\/deps\//],
    included: ["lib/**/*.{ex,exs}", "src/", "web/**/*.{ex,exs}", "apps/"]},
  requires: [], strict: false}}
  • The user is able to successfully run both Credo 0.5 & 0.8 locally, both with and without a credo.exs config.

  • Note that this is different output than that mentioned in the Credo issue opened on 08/10.

@davehenton , we are looking into this, stay tuned.

This definitely doesn't happen all the time. I tried an image from the registry (latest which appears to be 0.5, and beta which is 0.8) and locally built one from master (0.8.1). We would need a minimal reproduction example to move forward with this.

I would suggest user try CC CLI with debug output enabled.

CODECLIMATE_DEBUG=1 codeclimate analyze "nope"

While #5 output is different the base exception is the same. I'm almost convinced that the underlying issue is the same.

@pointlessone

Here's updated debug output from the user:

Starting analysis 
[DEBUG] credo:beta engine config: {"enabled":true,"channel":"beta","config":{"strict":"true"},"include_paths":["package.json","brunch-config.js","node_modules/","mix.lock","lib/","deps/",".idea/","priv/","config/",".gitignore","mix.exs","web/","test/","README.md","_build/","package-lock.json",".codeclimate.yml"]} 
[DEBUG] docker run: ["docker", "run", "--name", "cc-engines-credo-beta-0b02bd86-32f7-47be-ad04-5c30a55b22b3", "--cap-drop", "all", "--label", "com.codeclimate.label=916f25e1-7bbd-49a3-93eb-5c43f7f58bb5", "--memory", "512000000", "--memory-swap", "-1", "--net", "none", "--rm", "--volume", "/home/alex/Work/tmp/phx_tests/todos:/code:ro", "--volume", "/tmp/cc/f89f221a-ff52-47c3-9c40-4480b7129a03:/config.json:ro", "--user", "9000:9000", "codeclimate/codeclimate-credo:beta"] 
[DEBUG] credo:beta engine stderr: Error: 
%BadStructError{struct: Credo.Execution, 
term: %Credo.ConfigFile{check_for_updates: true, 
checks: [{Credo.Check.Consistency.ExceptionNames}, 
{Credo.Check.Consistency.LineEndings}, 
{Credo.Check.Consistency.ParameterPatternMatching}, 
{Credo.Check.Consistency.SpaceAroundOperators}, 
{Credo.Check.Consistency.SpaceInParentheses}, 
{Credo.Check.Consistency.TabsOrSpaces}, 
{Credo.Check.Design.AliasUsage, [priority: :low]}, 
{Credo.Check.Design.DuplicatedCode, [excluded_macros: []]}, 
{Credo.Check.Design.TagTODO, [exit_status: 2]}, 
{Credo.Check.Design.TagFIXME}, {Credo.Check.Readability.FunctionNames}, 
{Credo.Check.Readability.LargeNumbers}, 
{Credo.Check.Readability.MaxLineLength, [priority: :low, max_length: 80]}, 
{Credo.Check.Readability.ModuleAttributeNames}, 
{Credo.Check.Readability.ModuleDoc}, {Credo.Check.Readability.ModuleNames}, 
{Credo.Check.Readability.ParenthesesOnZeroArityDefs}, 
{Credo.Check.Readability.ParenthesesInCondition}, 
{Credo.Check.Readability.PredicateFunctionNames}, 
{Credo.Check.Readability.PreferImplicitTry}, 
{Credo.Check.Readability.RedundantBlankLines}, 
{Credo.Check.Readability.StringSigils}, 
{Credo.Check.Readability.TrailingBlankLine}, 
{Credo.Check.Readability.TrailingWhiteSpace}, 
{Credo.Check.Readability.VariableNames}, 
{Credo.Check.Readability.Semicolons}, 
{Credo.Check.Readability.SpaceAfterCommas}, 
{Credo.Check.Refactor.DoubleBooleanNegation}, 
{Credo.Check.Refactor.CondStatements}, 
{Credo.Check.Refactor.CyclomaticComplexity}, 
{Credo.Check.Refactor.FunctionArity}, {Credo.Check.Refactor.LongQuoteBlocks}, 
{Credo.Check.Refactor.MatchInCondition}, 
{Credo.Check.Refactor.NegatedConditionsInUnless}, 
{Credo.Check.Refactor.NegatedConditionsWithElse}, 
{Credo.Check.Refactor.Nesting}, {Credo.Check.Refactor.PipeChainStart}, 
{Credo.Check.Refactor.UnlessWithElse}, 
{Credo.Check.Warning.BoolOperationOnSameValues}, 
{Credo.Check.Warning.IExPry}, {Credo.Check.Warning.IoInspect}, 
{Credo.Check.Warning.LazyLogging}, 
{Credo.Check.Warning.OperationOnSameValues}, 
{Credo.Check.Warning.OperationWithConstantResult}, 
{Credo.Check.Warning.UnusedEnumOperation}, 
{Credo.Check.Warning.UnusedFileOperation}, {...}, ...], color: true, 
files: %{excluded: [~r/\/_build\//, ~r/\/deps\//], 
included: ["lib/**/*.{ex,exs}", "src/", "web/**/*.{ex,exs}", "apps/"]}, 
requires: [], strict: false}} 
Analysis complete! Found 0 issues.```

The issue seem to be caused by the strict config option. I'm not very familiar with Elixir to say more at the moment. The engine works without the option.

Hi, @davehenton I do believe that I'm the user with this issue so I'm answering directly here. I've tried without strict parameter & with "config":{"strict":"false"} result is the same:

CODECLIMATE_DEBUG=1 codeclimate analyze                  
Starting analysis
[DEBUG] credo:beta engine config: {"enabled":true,"channel":"beta","include_paths":[".circleci/",".credo.exs","mix.lock","lib/","deps/",".idea/","priv/","config/","mix.exs","web/","codeclimate-master/","test/","README.md","_build/",".codeclimate.yml"]}
[DEBUG] docker run: ["docker", "run", "--name", "cc-engines-credo-beta-51c82a73-33e7-4e3e-ac80-50d163a04d6d", "--cap-drop", "all", "--label", "com.codeclimate.label=1f2e95ca-7347-4bed-b2ee-a35d66d99074", "--memory", "512000000", "--memory-swap", "-1", "--net", "none", "--rm", "--volume", "/home/alex/Work/tmp/pg-phoenix-secure:/code:ro", "--volume", "/tmp/cc/4f27abcd-e191-406f-a371-a7c0e6a0dab9:/config.json:ro", "--user", "9000:9000", "codeclimate/codeclimate-credo:beta"]
[DEBUG] credo:beta engine stderr: Error:
%BadStructError{struct: Credo.Execution,
 term: %Credo.ConfigFile{check_for_updates: false,
  checks: [{Credo.Check.Consistency.ExceptionNames, []},
   {Credo.Check.Consistency.LineEndings, []},
   {Credo.Check.Consistency.ParameterPatternMatching, []},
   {Credo.Check.Consistency.SpaceAroundOperators, []},
   {Credo.Check.Consistency.SpaceInParentheses, []},
   {Credo.Check.Consistency.TabsOrSpaces, []},
   {Credo.Check.Design.AliasUsage, [priority: :low]},
   {Credo.Check.Design.DuplicatedCode, [excluded_macros: []]},
   {Credo.Check.Design.TagTODO, [exit_status: 2]},
   {Credo.Check.Design.TagFIXME, []},
   {Credo.Check.Readability.FunctionNames, []},
   {Credo.Check.Readability.LargeNumbers, []},
   {Credo.Check.Readability.MaxLineLength, [priority: :low, max_length: 80]},
   {Credo.Check.Readability.ModuleAttributeNames, []},
   {Credo.Check.Readability.ModuleDoc, []},
   {Credo.Check.Readability.ModuleNames, []},
   {Credo.Check.Readability.ParenthesesOnZeroArityDefs, []},
   {Credo.Check.Readability.ParenthesesInCondition, []},
   {Credo.Check.Readability.PredicateFunctionNames, []},
   {Credo.Check.Readability.PreferImplicitTry, []},
   {Credo.Check.Readability.RedundantBlankLines, []},
   {Credo.Check.Readability.StringSigils, []},
   {Credo.Check.Readability.TrailingBlankLine, []},
   {Credo.Check.Readability.TrailingWhiteSpace, []},
   {Credo.Check.Readability.VariableNames, []},
   {Credo.Check.Readability.Semicolons, []},
   {Credo.Check.Readability.SpaceAfterCommas, []},
   {Credo.Check.Refactor.DoubleBooleanNegation, []},
   {Credo.Check.Refactor.CondStatements, []},
   {Credo.Check.Refactor.CyclomaticComplexity, []},
   {Credo.Check.Refactor.FunctionArity, []},
   {Credo.Check.Refactor.LongQuoteBlocks, []},
   {Credo.Check.Refactor.MatchInCondition, []},
   {Credo.Check.Refactor.NegatedConditionsInUnless, []},
   {Credo.Check.Refactor.NegatedConditionsWithElse, []},
   {Credo.Check.Refactor.Nesting, []},
   {Credo.Check.Refactor.PipeChainStart, []},
   {Credo.Check.Refactor.UnlessWithElse, []},
   {Credo.Check.Warning.BoolOperationOnSameValues, []},
   {Credo.Check.Warning.IExPry, []}, {Credo.Check.Warning.IoInspect, []},
   {Credo.Check.Warning.LazyLogging, []},
   {Credo.Check.Warning.OperationOnSameValues, []},
   {Credo.Check.Warning.OperationWithConstantResult, []},
   {Credo.Check.Warning.UnusedEnumOperation, []},
   {Credo.Check.Warning.UnusedFileOperation, ...}, {...}, ...], color: true,
  files: %{excluded: [~r/\/_build\//, ~r/\/deps\//],
    included: ["lib/**/*.{ex,exs}", "src/", "web/**/*.{ex,exs}", "apps/"]},

Analysis complete! Found 0 issues.

@Kitton Did you try removing it completely form the config?

Strict field - yes, actually in the last output I don't have it

Any update on this @pointlessone @katwchen?

I've debugged this problem and the BadStructError appears to be caused by line 168 in Codeclimate.CLI, where a Credo.Execution struct is being created from a Credo.ConfigFile struct and some config overrides. When using the struct update syntax in Elixir the structs must match, which caused the error.

I've fixed this bug on our fork of the repo, but the Code Climate documentation for community engines doesn't do a good job explaining what should be the output of the engine, so I'm not sure where to go form here. I've build the docker image using docker build -t codeclimate/codeclimate-credo-fixed:latest and used the command CODECLIMATE_DEBUG=1 codeclimate analyze --dev -e credo-fixed to use the local engine, but the output now is:

~/Code/testproject » CODECLIMATE_DEBUG=1 codeclimate analyze --dev -e credo-fixed
Starting analysis
[DEBUG] credo-fixed:stable engine config: {"enabled":true,"include_paths":[".codeclimate.yml",".credo.exs",".gitignore","_build/","config/","lib/","mix.exs","README.md","test/"]}
[DEBUG] docker run: ["docker", "run", "--name", "cc-engines-credo-fixed-stable-54bfcf03-a57e-4f98-866d-dd74d2f5a85b", "--cap-drop", "all", "--label", "com.codeclimate.label=1e5c4bbd-db3c-474e-881c-11e1ed3397b2", "--memory", "512000000", "--memory-swap", "-1", "--net", "none", "--rm", "--volume", "/Users/kamil/Code/testproject:/code:ro", "--volume", "/tmp/cc/a62deb05-9b06-49d7-8c0c-671b65bb4a58:/config.json:ro", "--user", "9000:9000", "codeclimate/codeclimate-credo-fixed:latest"]
[DEBUG] credo-fixed:stable engine output: =ERROR REPORT==== 22-Sep-2017::08:40:09 ===
** Task <0.60.0> terminating
** Started from <0.39.0>
** When function  == #Fun<Elixir.Credo.Check.Runner.14.112707193>
**      arguments == []
** Reason for termination ==
** {{noproc,
        {'Elixir.GenServer',call,
            [nil,
             {append,<<"lib/testproject.ex">>,
                 [#{'__struct__' => 'Elixir.Credo.Issue',
                    category => readability,
                    check => 'Elixir.Credo.Check.Readability.FunctionNames',
                    column => 7,
                    exit_status => 4,
                    filename => <<"lib/testproject.ex">>,
                    line_no => 15,
                    message => <<"Function/macro names should be written in snake_case.">>,
                    meta => [],
                    priority => 11,
                    scope => <<"Testproject.incorrectFunctionName">>,
                    severity => 1,
                    trigger => incorrectFunctionName}]},
             5000]}},
    [{'Elixir.GenServer',call,3,[{file,"lib/gen_server.ex"},{line,596}]},
     {'Elixir.Credo.Check.Runner',run,2,
         [{file,"lib/credo/check/runner.ex"},{line,33}]},
     {'Elixir.Task.Supervised',do_apply,2,
         [{file,"lib/task/supervised.ex"},{line,94}]},
     {'Elixir.Task.Supervised',reply,5,
         [{file,"lib/task/supervised.ex"},{line,45}]},
     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}

=ERROR REPORT==== 22-Sep-2017::08:40:09 ===
** Generic server 'Elixir.Credo.Supervisor' terminating
** Last message in was {'EXIT',<0.39.0>,
                        {noproc,
                         {'Elixir.GenServer',call,
                          [nil,
                           {append,<<"lib/testproject.ex">>,
                            [#{'__struct__' => 'Elixir.Credo.Issue',
                               category => readability,
                               check => 'Elixir.Credo.Check.Readability.FunctionNames',
                               column => 7,
                               exit_status => 4,
                               filename => <<"lib/testproject.ex">>,
                               line_no => 15,
                               message => <<"Function/macro names should be written in snake_case.">>,
                               meta => [],
                               priority => 11,
                               scope => <<"Testproject.incorrectFunctionName">>,
                               severity => 1,
                               trigger => incorrectFunctionName}]},
                           5000]}}}
** When Server state == {state,
                         {local,'Elixir.Credo.Supervisor'},
                         one_for_one,
                         [{child,<0.46.0>,
                           'Elixir.Credo.Service.SourceFileSource',
                           {'Elixir.Credo.Service.SourceFileSource',
                            start_link,[]},
                           permanent,5000,worker,
                           ['Elixir.Credo.Service.SourceFileSource']},
                          {child,<0.45.0>,
                           'Elixir.Credo.Service.SourceFileLines',
                           {'Elixir.Credo.Service.SourceFileLines',
                            start_link,[]},
                           permanent,5000,worker,
                           ['Elixir.Credo.Service.SourceFileLines']},
                          {child,<0.44.0>,
                           'Elixir.Credo.Service.SourceFileAST',
                           {'Elixir.Credo.Service.SourceFileAST',start_link,
                            []},
                           permanent,5000,worker,
                           ['Elixir.Credo.Service.SourceFileAST']},
                          {child,<0.43.0>,
                           'Elixir.Credo.Service.SourceFileScopes',
                           {'Elixir.Credo.Service.SourceFileScopes',
                            start_link,[]},
                           permanent,5000,worker,
                           ['Elixir.Credo.Service.SourceFileScopes']},
                          {child,<0.42.0>,'Elixir.Credo.Service.Commands',
                           {'Elixir.Credo.Service.Commands',start_link,[]},
                           permanent,5000,worker,
                           ['Elixir.Credo.Service.Commands']},
                          {child,<0.41.0>,'Elixir.Credo.CLI.Output.Shell',
                           {'Elixir.Credo.CLI.Output.Shell',start_link,[]},
                           permanent,5000,worker,
                           ['Elixir.Credo.CLI.Output.Shell']}],
                         undefined,3,5,[],0,'Elixir.Supervisor.Default',
                         {ok,
                          {{one_for_one,3,5},
                           [{'Elixir.Credo.CLI.Output.Shell',
                             {'Elixir.Credo.CLI.Output.Shell',start_link,[]},
                             permanent,5000,worker,
                             ['Elixir.Credo.CLI.Output.Shell']},
                            {'Elixir.Credo.Service.Commands',
                             {'Elixir.Credo.Service.Commands',start_link,[]},
                             permanent,5000,worker,
                             ['Elixir.Credo.Service.Commands']},
                            {'Elixir.Credo.Service.SourceFileScopes',
                             {'Elixir.Credo.Service.SourceFileScopes',
                              start_link,[]},
                             permanent,5000,worker,
                             ['Elixir.Credo.Service.SourceFileScopes']},
                            {'Elixir.Credo.Service.SourceFileAST',
                             {'Elixir.Credo.Service.SourceFileAST',
                              start_link,[]},
                             permanent,5000,worker,
                             ['Elixir.Credo.Service.SourceFileAST']},
                            {'Elixir.Credo.Service.SourceFileLines',
                             {'Elixir.Credo.Service.SourceFileLines',
                              start_link,[]},
                             permanent,5000,worker,
                             ['Elixir.Credo.Service.SourceFileLines']},
                            {'Elixir.Credo.Service.SourceFileSource',
                             {'Elixir.Credo.Service.SourceFileSource',
                              start_link,[]},
                             permanent,5000,worker,
                             ['Elixir.Credo.Service.SourceFileSource']}]}}}
** Reason for termination ==
** {noproc,
       {'Elixir.GenServer',call,
           [nil,
            {append,<<"lib/testproject.ex">>,
                [#{'__struct__' => 'Elixir.Credo.Issue',
                   category => readability,
                   check => 'Elixir.Credo.Check.Readability.FunctionNames',
                   column => 7,
                   exit_status => 4,
                   filename => <<"lib/testproject.ex">>,
                   line_no => 15,
                   message => <<"Function/macro names should be written in snake_case.">>,
                   meta => [],
                   priority => 11,
                   scope => <<"Testproject.incorrectFunctionName">>,
                   severity => 1,
                   trigger => incorrectFunctionName}]},
            5000]}}
error: (JSON::ParserError) 743: unexpected token at '=ERROR REPORT==== 22-Sep-2017::08:40:09 ===
** Task <0.60.0> terminating
** Started from <0.39.0>
** When function  == #Fun<Elixir.Credo.Check.Runner.14.112707193>
**      arguments == []
** Reason for termination ==
** {{noproc,
        {'Elixir.GenServer',call,
            [nil,
             {append,<<"lib/testproject.ex">>,
                 [#{'__struct__' => 'Elixir.Credo.Issue',
                    category => readability,
                    check => 'Elixir.Credo.Check.Readability.FunctionNames',
                    column => 7,
                    exit_status => 4,
                    filename => <<"lib/testproject.ex">>,
                    line_no => 15,
                    message => <<"Function/macro names should be written in snake_case.">>,
                    meta => [],
                    priority => 11,
                    scope => <<"Testproject.incorrectFunctionName">>,
                    severity => 1,
                    trigger => incorrectFunctionName}]},
             5000]}},
    [{'Elixir.GenServer',call,3,[{file,"lib/gen_server.ex"},{line,596}]},
     {'Elixir.Credo.Check.Runner',run,2,
         [{file,"lib/credo/check/runner.ex"},{line,33}]},
     {'Elixir.Task.Supervised',do_apply,2,
         [{file,"lib/task/supervised.ex"},{line,94}]},
     {'Elixir.Task.Supervised',reply,5,
         [{file,"lib/task/supervised.ex"},{line,45}]},
     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}

=ERROR REPORT==== 22-Sep-2017::08:40:09 ===
** Generic server 'Elixir.Credo.Supervisor' terminating
** Last message in was {'EXIT',<0.39.0>,
                        {noproc,
                         {'Elixir.GenServer',call,
                          [nil,
                           {append,<<"lib/testproject.ex">>,
                            [#{'__struct__' => 'Elixir.Credo.Issue',
                               category => readability,
                               check => 'Elixir.Credo.Check.Readability.FunctionNames',
                               column => 7,
                               exit_status => 4,
                               filename => <<"lib/testproject.ex">>,
                               line_no => 15,
                               message => <<"Function/macro names should be written in snake_case.">>,
                               meta => [],
                               priority => 11,
                               scope => <<"Testproject.incorrectFunctionName">>,
                               severity => 1,
                               trigger => incorrectFunctionName}]},
                           5000]}}}
** When Server state == {state,
                         {local,'Elixir.Credo.Supervisor'},
                         one_for_one,
                         [{child,<0.46.0>,
                           'Elixir.Credo.Service.SourceFileSource',
                           {'Elixir.Credo.Service.SourceFileSource',
                            start_link,[]},
                           permanent,5000,worker,
                           ['Elixir.Credo.Service.SourceFileSource']},
                          {child,<0.45.0>,
                           'Elixir.Credo.Service.SourceFileLines',
                           {'Elixir.Credo.Service.SourceFileLines',
                            start_link,[]},
                           permanent,5000,worker,
                           ['Elixir.Credo.Service.SourceFileLines']},
                          {child,<0.44.0>,
                           'Elixir.Credo.Service.SourceFileAST',
                           {'Elixir.Credo.Service.SourceFileAST',start_link,
                            []},
                           permanent,5000,worker,
                           ['Elixir.Credo.Service.SourceFileAST']},
                          {child,<0.43.0>,
                           'Elixir.Credo.Service.SourceFileScopes',
                           {'Elixir.Credo.Service.SourceFileScopes',
                            start_link,[]},
                           permanent,5000,worker,
                           ['Elixir.Credo.Service.SourceFileScopes']},
                          {child,<0.42.0>,'Elixir.Credo.Service.Commands',
                           {'Elixir.Credo.Service.Commands',start_link,[]},
                           permanent,5000,worker,
                           ['Elixir.Credo.Service.Commands']},
                          {child,<0.41.0>,'Elixir.Credo.CLI.Output.Shell',
                           {'Elixir.Credo.CLI.Output.Shell',start_link,[]},
                           permanent,5000,worker,
                           ['Elixir.Credo.CLI.Output.Shell']}],
                         undefined,3,5,[],0,'Elixir.Supervisor.Default',
                         {ok,
                          {{one_for_one,3,5},
                           [{'Elixir.Credo.CLI.Output.Shell',
                             {'Elixir.Credo.CLI.Output.Shell',start_link,[]},
                             permanent,5000,worker,
                             ['Elixir.Credo.CLI.Output.Shell']},
                            {'Elixir.Credo.Service.Commands',
                             {'Elixir.Credo.Service.Commands',start_link,[]},
                             permanent,5000,worker,
                             ['Elixir.Credo.Service.Commands']},
                            {'Elixir.Credo.Service.SourceFileScopes',
                             {'Elixir.Credo.Service.SourceFileScopes',
                              start_link,[]},
                             permanent,5000,worker,
                             ['Elixir.Credo.Service.SourceFileScopes']},
                            {'Elixir.Credo.Service.SourceFileAST',
                             {'Elixir.Credo.Service.SourceFileAST',
                              start_link,[]},
                             permanent,5000,worker,
                             ['Elixir.Credo.Service.SourceFileAST']},
                            {'Elixir.Credo.Service.SourceFileLines',
                             {'Elixir.Credo.Service.SourceFileLines',
                              start_link,[]},
                             permanent,5000,worker,
                             ['Elixir.Credo.Service.SourceFileLines']},
                            {'Elixir.Credo.Service.SourceFileSource',
                             {'Elixir.Credo.Service.SourceFileSource',
                              start_link,[]},
                             permanent,5000,worker,
                             ['Elixir.Credo.Service.SourceFileSource']}]}}}
** Reason for termination ==
** {noproc,
       {'Elixir.GenServer',call,
           [nil,
            {append,<<"lib/testproject.ex">>,
                [#{'__struct__' => 'Elixir.Credo.Issue',
                   category => readability,
                   check => 'Elixir.Credo.Check.Readability.FunctionNames',
                   column => 7,
                   exit_status => 4,
                   filename => <<"lib/testproject.ex">>,
                   line_no => 15,
                   message => <<"Function/macro names should be written in snake_case.">>,
                   meta => [],
                   priority => 11,
                   scope => <<"Testproject.incorrectFunctionName">>,
                   severity => 1,
                   trigger => incorrectFunctionName}]},
            5000]}}
'
[DEBUG] backtrace: /usr/lib/ruby/gems/2.2.0/gems/json-2.0.3/lib/json/common.rb:156:in `parse'
	/usr/lib/ruby/gems/2.2.0/gems/json-2.0.3/lib/json/common.rb:156:in `parse'
	/usr/src/app/lib/cc/analyzer/issue.rb:63:in `parsed_output'
	/usr/src/app/lib/cc/analyzer/issue.rb:24:in `as_json'
	/usr/lib/ruby/gems/2.2.0/gems/activesupport-5.0.5/lib/active_support/json/encoding.rb:33:in `encode'
	/usr/lib/ruby/gems/2.2.0/gems/activesupport-5.0.5/lib/active_support/json/encoding.rb:20:in `encode'
	/usr/lib/ruby/gems/2.2.0/gems/activesupport-5.0.5/lib/active_support/core_ext/object/json.rb:37:in `to_json'
	/usr/src/app/lib/cc/analyzer/engine_output.rb:5:in `to_json'
	/usr/src/app/lib/cc/analyzer/engine.rb:46:in `block in run'
	/usr/src/app/lib/cc/analyzer/container.rb:120:in `call'
	/usr/src/app/lib/cc/analyzer/container.rb:120:in `block (2 levels) in read_stdout'
	/usr/src/app/lib/cc/analyzer/container.rb:117:in `each_line'
	/usr/src/app/lib/cc/analyzer/container.rb:117:in `block in read_stdout'

I see the Credo linting error about an incorrect snakeCase function in the Testproject module, but this output is clearly another error. Any idea what might be wrong @abbyarmada @davehenton ?

@kamilkowalski Thank you? Please refer to the spec for output details. I see your engine produces raw output. I'd imagine it would produce JSON as this engine used to if you fixed only the config issue.

Hi! I've updated credo and engine to latest version. Could you check if #9 is working correctly? Thanks!