/ducalis

RuboCop based static code analyzer for enterprise Rails applications.

Primary LanguageRubyMIT LicenseMIT

Ducalis

Gem Version Build Status Maintainability

Ducalis is RuboCop-based static code analyzer for enterprise Rails applications.

Documentation available at https://ducalis-rb.github.io/. Changelog at https://ducalis-rb.github.io/log.

Ducalis isn't style checker and could sometimes be false-positive it's not necessary to follow all it rules, the main purpose of Ducalis is help to find possible weak code parts.

Installation and Usage

Add this line to your application's Gemfile:

gem 'ducalis'

Ducalis is CLI application. By defaukt it will notify you about any possible violations in CLI.

ducalis .
ducalis app/controllers/

Ducalis allows to pass build even with violations it's make sense to run Ducalis across current branch or index:

ducalis --branch .
ducalis --index .

Additionally you can pass --reporter argument to notify about found violations in boundaries of PR:

ducalis --reporter "author/repo#42" .
ducalis --reporter "circleci" .

N.B. You should provide GITHUB_TOKEN Env to allow Ducalis download your PR code and write review comments.

In CLI modes you can provide yours .ducalis.yml file based on default by -c flag or simply putting it in your project directory.

Configuration

One or more individual cops can be disabled locally in a section of a file by adding a comment such as

# ducalis:disable Ducalis/PreferableMethods Use `delete_all` because of performance reasons
def remove_audits
  AuditLog.where(user_id: user_id).delete_all
end

The main behavior of Ducalis can be controlled via the .ducalis.yml. It makes it possible to enable/disable certain cops (checks) and to alter their behavior if they accept any parameters. List of all available cops could be found in the documentation.

License

The gem is available as open source under the terms of the MIT License.

Contribution

Contributions are welcome! To pass your code through the all checks you simply need to run:

bundle exec rake