README.md (2844B)
1 # Credo [![CI Tests](https://github.com/rrrene/credo/workflows/CI%20Tests/badge.svg)](https://github.com/rrrene/credo/actions?query=branch%3Amaster) [![Inline docs](https://inch-ci.org/github/rrrene/credo.svg?branch=master)](https://hexdocs.pm/credo) 2 3 Credo is a static code analysis tool for the Elixir language with a focus on teaching and code consistency. 4 5 It can show you refactoring opportunities in your code, complex code fragments, warn you about common mistakes, show inconsistencies in your naming scheme and - if needed - help you enforce a desired coding style. 6 7 8 ![Credo](https://raw.github.com/rrrene/credo/master/assets/screenshot.png) 9 10 11 ## Installation and Usage 12 13 The easiest way to add Credo to your project is by [using Mix](http://elixir-lang.org/getting-started/mix-otp/introduction-to-mix.html). 14 15 Add `:credo` as a dependency to your project's `mix.exs`: 16 17 ```elixir 18 defp deps do 19 [ 20 {:credo, "~> 1.6", only: [:dev, :test], runtime: false} 21 ] 22 end 23 ``` 24 25 And run: 26 27 $ mix deps.get 28 29 $ mix credo 30 31 ## Documentation 32 33 Documentation is [available on Hexdocs](https://hexdocs.pm/credo/) 34 35 ## Integrations 36 37 ### IDE/Editor 38 39 Some IDEs and editors are able to run Credo in the background and mark issues inline. 40 41 * [IntelliJ Elixir](https://github.com/KronicDeth/intellij-elixir#credo) - Elixir plugin for JetBrains IDEs (IntelliJ IDEA, Rubymine, PHPStorm, PyCharm, etc) 42 * [linter-elixir-credo](https://atom.io/packages/linter-elixir-credo) - Package for Atom editor (by @smeevil) 43 * [Elixir Linter (Credo)](https://marketplace.visualstudio.com/items?itemName=pantajoe.vscode-elixir-credo) - VSCode extension (by @pantajoe) 44 * [flycheck](https://www.flycheck.org/en/latest/languages.html#elixir) - Emacs syntax checking extension 45 * [kakoune](https://github.com/mawww/kakoune/wiki/Lint#elixir) - Config for linting support in Kakoune editor 46 * [Neovim via null-ls](https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/lua/null-ls/builtins/diagnostics/credo.lua) - diagnostics builtin 47 48 ### Automated Code Review 49 50 * [Codacy](https://www.codacy.com/) - checks your code from style to security, duplication, complexity, and also integrates with coverage. 51 * [SourceLevel](https://sourcelevel.io/) - tracks how your code changes over time and have this information accessible to your whole team. 52 * [Stickler CI](https://stickler-ci.com/) - checks your code for style and best practices across your entire stack. 53 54 ## Contributing 55 56 1. [Fork it!](http://github.com/rrrene/credo/fork) 57 2. Create your feature branch (`git checkout -b my-new-feature`) 58 3. Commit your changes (`git commit -am 'Add some feature'`) 59 4. Push to the branch (`git push origin my-new-feature`) 60 5. Create new Pull Request 61 62 63 64 ## Author 65 66 René Föhring (@rrrene) 67 68 69 70 ## License 71 72 Credo is released under the MIT License. See the LICENSE file for further 73 details.