Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Shared, minimal rubocop config

License

NotificationsYou must be signed in to change notification settings

nxt-insurance/nxt_cop

Repository files navigation

Getsafe shared Rubocop Config.

Installation

Add this line to your application's Gemfile:

group:test,:developmentdogem'nxt_cop'end

Or, for a Ruby library, add this to your gemspec:

spec.add_development_dependency'nxt_cop'

And then run:

$ bundle install

Usage

Create a.rubocop.yml with the following directives:

inherit_gem:nxt_cop:    -default.yml

Now, run:

$ bundleexec rubocop

You do not need to include rubocop directly in your application's dependencies. nxt_cop will include a specific version ofrubocop that is shared across all projects.

It is also possible to override styles or add styles to your application.

NOTE: Don't configureAllCops as it will override many of the rules in this gem.

inherit_gem:  nxt_cop:    - default.ymlLint/Style:  Exclude:    - db/schema.rb    - db/migrate/*.rb

Development

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

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

Release a new version

Setup credentials

bundle configset gem.push_key rubygems

Add to~/.gem/credentials (create if it doesn't exist):

:rubygems:<your Rubygems API key>

Release process

  • Merge all Depfu updates
  • Runbundle install to update dependencies
  • Runrubocop to see if new rules were added
    • If yes, add them todefault.yml to prevent "New rules" warning
  • Update the version number inversion.rb
  • Runbundle install again to update the version in Gemfile.lock
  • Update theCHANGELOG.md
  • Open the PR, merge everything tomain

Once PR is merged, switch to main and runbundle exec rake release which will create a git tag for the version, push git commits and tags, and push the.gem file torubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub athttps://github.com/nxt-insurance/nxt_cop.

License

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


[8]ページ先頭

©2009-2025 Movatter.jp