xtian / credo_contrib Goto Github PK
View Code? Open in Web Editor NEWA happy home for custom Credo checks
License: ISC License
A happy home for custom Credo checks
License: ISC License
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.
Module attributes should generally come before defstruct
, since they can be used there.
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).
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.