GithubHelp home page GithubHelp logo

isabella232 / rubocop-sorbet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shopify/rubocop-sorbet

0.0 0.0 0.0 132 KB

A collection of Rubocop rules for Sorbet

License: MIT License

Ruby 99.87% Shell 0.13%

rubocop-sorbet's Introduction

Rubocop-Sorbet

Build Status

A collection of Rubocop rules for Sorbet.

Installation

Just install the rubocop-sorbet gem

gem install rubocop-sorbet

or, if you use Bundler, add this line your application's Gemfile:

gem 'rubocop-sorbet', require: false

Usage

You need to tell RuboCop to load the Sorbet extension. There are three ways to do this:

RuboCop configuration file

Put this into your .rubocop.yml:

require: rubocop-sorbet

Alternatively, use the following array notation when specifying multiple extensions:

require:
  - rubocop-other-extension
  - rubocop-sorbet

Now you can run rubocop and it will automatically load the RuboCop Sorbet cops together with the standard cops.

Command line

rubocop --require rubocop-sorbet

Rake task

RuboCop::RakeTask.new do |task|
  task.requires << 'rubocop-sorbet'
end

The Cops

All cops are located under lib/rubocop/cop/sorbet, and contain examples/documentation.

In your .rubocop.yml, you may treat the Sorbet cops just like any other cop. For example:

Sorbet/FalseSigil:
  Exclude:
    - lib/example.rb

Documentation

You can read about each cop supplied by RuboCop Sorbet in the manual.

Compatibility

Sorbet cops support the following versions:

  • Sorbet >= 0.5
  • Ruby >= 2.5

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Shopify/rubocop-sorbet. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

To contribute a new cop, please use the supplied generator like this:

bundle exec rake new_cop[Sorbet/NewCopName]

which will create a skeleton cop, a skeleton spec, an entry in the default config file and will require the new cop so that it is properly exported from the gem.

License

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

Code of Conduct

Everyone interacting in the Rubocop::Sorbet project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

rubocop-sorbet's People

Contributors

byroot avatar casperisfine avatar ethanjgoldberg avatar ghiculescu avatar jeffcarbs avatar kaanozkan avatar morriar avatar paracycle avatar peterzhu2118 avatar rafaelfranca avatar shopify-admins avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.