TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Credo: Static code analysis for Elixir with a focus on consistency and teaching

137 pointsby rrreneover 8 years ago

6 comments

killercupover 8 years ago
Heard a talk about this at the last Elixir meetup in Cologne, looks pretty amazing – especially because of the focus on great explanations.<p>(Should copy more lints from <a href="https:&#x2F;&#x2F;github.com&#x2F;Manishearth&#x2F;rust-clippy" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Manishearth&#x2F;rust-clippy</a> though! ;))
sotojuanover 8 years ago
I just ran this on some old code and it told me a function was too complex (it is!) and could use refactoring, that&#x27;s some smart linting :-)
评论 #12355847 未加载
评论 #12356170 未加载
corysamaover 8 years ago
I don&#x27;t know if it&#x27;s coincidence, but over in <a href="https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;elixir&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;elixir&#x2F;</a> today, someone happened to post<p>&quot;Automated Elixir code review with Github, Credo and Travis CI&quot; <a href="https:&#x2F;&#x2F;medium.com&#x2F;@fazibear&#x2F;automated-elixir-code-review-with-github-credo-and-travis-ci-986cd56b8f02" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;@fazibear&#x2F;automated-elixir-code-review-wi...</a>
qubitcoderover 8 years ago
I first happened upon Credo while building a console-based version of 2048 (this was the early stages of learning Elixir). Running Credo on my code for the first time was a delight. It made me instantly wish for similar tools for our non-Elixir code bases at work.<p>For those venturing into Elixir, Credo is especially useful. While I&#x27;m experienced in functional programming, Credo was a great way to learn more idiomatic usage of Elixir.<p>While Haskell has the fantastic ghc-mod for guided refactoring, Go has gofmt, and Ruby has rubocop among others, I find Credo to be a nice blend of the best features of all these tools. I also appreciate the UI, which groups feedback into 3 visually-distinct categories: Code Readability, Refactoring Opportunities, and Warnings [1]. This makes it makes it easy to prioritize your changes.<p>If you&#x27;d like more background on Credo, The Elixir Fountain [2] recently hosted a nice podcast with the creator of Credo, René Föhring [3].<p>[1] <a href="http:&#x2F;&#x2F;credo-ci.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;credo-ci.org&#x2F;</a> [2] <a href="http:&#x2F;&#x2F;elixirfountain.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;elixirfountain.com&#x2F;</a> [3] <a href="https:&#x2F;&#x2F;soundcloud.com&#x2F;elixirfountain&#x2F;elixir-fountain-rene-fohring-2016-06-13" rel="nofollow">https:&#x2F;&#x2F;soundcloud.com&#x2F;elixirfountain&#x2F;elixir-fountain-rene-f...</a>
svetobover 8 years ago
We have been using this as a build step for our services, it&#x27;s possible to configure what exactly it will fail you on. Has been very helpful and not only helped us ensure good code, but taught us some good Elixir conventions as well!
aczerepinskiover 8 years ago
This looks great. I&#x27;ve been using dogma and haven&#x27;t found an inline function disable like this appears to have with @lint. I&#x27;ll give it a try soon.