Giter Site home page Giter Site logo

credo_contrib's People

Contributors

kitton avatar smaximov avatar xtian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

credo_contrib's Issues

Plugin does not work

Hi,

I just noticed that the checks defined here are not running on my project when using the plugins syntax described in the readme. If I remove it from plugins and manually add the checks then it does correctly start running them.

I am using credo 1.6.6. I also tested with 1.7.0 and the issue persists.

Push the 0.1.1 release?

credo_contrib 0.1 is not compatible with credo 1.0 without an explicit override, but the master branch of credo_contrib specifies compatibility. Pushing the new version would allow this to continue o work (although I would recommend that the version be bumped to 0.2 instead of 0.1.1 for better clarity re: semantic versioning).

Issue when dynamically defining methods

module has code:

  @layer_noop_actions [
    :layer_ok
  ]

  for action <- @layer_noop_actions do
    def unquote(action)(%Context{} = context, layer, result) do
      handle_action(context, layer, unquote(action), result)
    end
  end

and I get the error:

** (config) Error while running Elixir.CredoContrib.Check.FunctionNameUnderscorePrefix on lib/scorecard_ex/context_actions.ex

00:44:29.658 [error] Task #PID<0.94.0> started from #PID<0.4298.0> terminating
** (ArgumentError) argument error
    :erlang.atom_to_binary({:unquote, [line: 63, column: 9], [{:action, [line: 63, column: 17], nil}]}, :utf8)
    lib/check/function_name_underscore_prefix.ex:19: CredoContrib.Check.FunctionNameUnderscorePrefix.traverse/3
    (elixir 1.10.3) lib/macro.ex:410: Macro.do_traverse/4
    (elixir 1.10.3) lib/enum.ex:1520: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
    (elixir 1.10.3) lib/macro.ex:416: Macro.do_traverse/4
    (elixir 1.10.3) lib/enum.ex:1520: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
    (elixir 1.10.3) lib/enum.ex:1520: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
    (elixir 1.10.3) lib/macro.ex:396: Macro.do_traverse/4
Function: #Function<9.9572610/0 in Credo.Check.Runner.run/2>
    Args: []
** (EXIT from #PID<0.94.0>) an exception was raised:
    ** (ArgumentError) argument error
        :erlang.atom_to_binary({:unquote, [line: 63, column: 9], [{:action, [line: 63, column: 17], nil}]}, :utf8)
        lib/check/function_name_underscore_prefix.ex:19: CredoContrib.Check.FunctionNameUnderscorePrefix.traverse/3
        (elixir 1.10.3) lib/macro.ex:410: Macro.do_traverse/4
        (elixir 1.10.3) lib/enum.ex:1520: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
        (elixir 1.10.3) lib/macro.ex:416: Macro.do_traverse/4
        (elixir 1.10.3) lib/enum.ex:1520: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
        (elixir 1.10.3) lib/enum.ex:1520: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
        (elixir 1.10.3) lib/macro.ex:396: Macro.do_traverse/4

Seems its not expanding defs before analyzing

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.