Giter Site home page Giter Site logo

rangeroob / rubocop-packaging Goto Github PK

View Code? Open in Web Editor NEW

This project forked from utkarsh2102/rubocop-packaging

0.0 1.0 0.0 126 KB

A RuboCop extension focused on enforcing upstream best practices and coding conventions.

License: MIT License

Ruby 99.63% Shell 0.37%

rubocop-packaging's Introduction

RuboCop::Packaging

RuboCop::Packaging is an extension of RuboCop, which is a Ruby static code analyzer (a.k.a. linter) and code formatter.

It helps enforcing some of the guidelines that are expected of upstream maintainers so that the downstream can build their packages in a clean environment without any problems.

Documentation

A detailed documentation, explaining what this extension is doing and the reasoning behind it, can be found here: https://docs.rubocop.org/rubocop-packaging/

We also have a packaging-style-guide, listing some good and bad examples and the rationale behind these cops.

In case anything is not clear, please feel free to raise an issue, asking for more explanation!

Installation

Add this line to your application's Gemfile:

gem 'rubocop-packaging'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install rubocop-packaging

Usage

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

RuboCop configuration file

Put this into your .rubocop.yml file:

require: rubocop-packaging

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

require:
  - rubocop-other-extension
  - rubocop-packaging

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

Command line

rubocop --require rubocop-packaging

Rake task

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

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install.

Contributing

As always, bug reports and pull requests are heartily welcomed! ๐Ÿ’–
This project is intended to be a safe and welcoming space for collaboration.

License

rubocop-packaging is available as open-source under the MIT License.

rubocop-packaging's People

Contributors

utkarsh2102 avatar terceiro avatar deivid-rodriguez avatar marcandre avatar

Watchers

James Cloos 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.