Comments (4)
That's a valid argument.
I am a bit uncertain whether or not to keep these checks at all. Originally you could write something like
defp server(https \\ false) do
# ... code ...
end
# somewhere in a function:
server = server(true)
Now, with a regular call to server
it might have become unclear if you were calling the variable or the function (using default arguments). But since Elixir 1.2 you would have to call server()
to call the function, so this check might be outdated ...
Long story short, you're suggestion to check the arity is a very good one to solve those problems.
from credo.
Woho, awesome! :)
from credo.
v0.4.5
is live and contains this fix.
from credo.
Yay!
from credo.
Related Issues (20)
- Checking multiple files (not all the project) does not work
- In Windows folder path with ending `\` does not work with `--format json` HOT 4
- Credo segfaults (Elixir 1.14.2, Credo 1.6.7, Ubuntu 22.04) HOT 3
- False positive on NestedFunctionCalls check HOT 2
- False positive on MultiAliasImportRequireUse when using multiple modules in same file HOT 1
- False positive of `Credo.Check.Warning.UnusedStringOperation` HOT 3
- False positive: Identical sub-expression of || and && operator HOT 4
- False positive: snake_case warning for operators HOT 6
- MissedMetadataKeyInLoggerConfig shouldn't warn if you don't use the console logger backend HOT 6
- mix credo diff --from-git-ref master showing issues in files not modified HOT 5
- False negative: Nested blocks inside an if/else clause are not detected HOT 4
- Parse error with escaped heredocs HOT 2
- coworker wrote this, you may want to add it to credo HOT 3
- MissedMetadataKeyInLoggerConfig breaks with `metadata: :all` HOT 1
- Readability.NestedFunctionCalls triggered on function calls in interpolated strings
- Ignore ansi_color metadata key
- Sarif output cannot be parsed by `github/codeql-action/upload-sarif@v2` HOT 4
- False positive: Use a pipeline when there are nested function calls HOT 2
- Compilation error in file lib/credo/check/consistency/exception_names.ex
- `Credo.Check.Warning.MissedMetadataKeyInLoggerConfig` should by default allow Erlang's metadata keys
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from credo.