Elvis is a code style checker that can apply common guidelines in your GitHub-hosted Erlang project, by detecting where guidelines are not being met. Once Elvis is activated for your repository, the rules you configure will be executed every time a pull request is created or updated, and Elvis will add comments to the lines that don't comply with these rules. By using this to verify the project you automate part of the review process and help reviewers focus on the most important details. Since only those lines that have been modified in the pull request are considered when adding comments, you can use Elvis as a component in the incremental improvement of your code base.
Enables style consistency across all your code base
Encourages development teams to consider and establish code conventions
Allows continuous monitoring of code quality
Helps developers avoid recurring mistakes that can be detected automatically
Provides coding style consistency among the different projects in a company and in doing so, facilitating project switching for developers and allowing easier code sharing between projects
Implement more rules that enforce additional Erlang guidelines
Add support for user defined rules when checking pull requests
Extend functionality to include other tools like dialyzer and xref
The set of rules that are run can be selected by specifying a configuration file (elvis.config) in your project. Some rules accept one or more configuration values, allowing for a large amount of flexibility when applying them. See a sample of rules already implemented for Elvis below – the complete list can be found in the Elvis GitHub repository’s wiki.
There shouldn't be any nested expressions that exceed the limit specified in the configuration
There shouldn't be any modules that export a number of functions greater than the limit specified in the configuration
Don't use a variable whose name indicates it is actually an ignored variable (i.e. it starts with an underscore _Var).
Elvis is free of charge for public repositories, but using it for private repositories involves a small annual fee for each private repository.