TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

137 点作者 rrrene将近 9 年前

6 条评论

killercup将近 9 年前
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! ;))
sotojuan将近 9 年前
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 未加载
corysama将近 9 年前
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>
qubitcoder将近 9 年前
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>
svetob将近 9 年前
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!
aczerepinski超过 8 年前
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.