GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - reevoo/reevoocop: 20% MonkeyPatch, 80% YAML, 100% Style

BranchesTags
Open more actions menu

Latest commit

 

History

85 Commits
85 Commits

Folders and files

NameName
Last commit message
Last commit date
bin
bin
 
 
examples
examples
 
 
lib
lib
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
Gemfile
Gemfile
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
Rakefile
Rakefile
 
 
reevoocop.gemspec
reevoocop.gemspec
 
 

Repository files navigation

Reevoocop

20% MonkeyPatch, 80% YAML, 100% Style

Reevoocop uses RuboCop to enforce Reevoo's style guidelines.

"What are the guidelines?", I hear you bellow. Well, check out our commented settings file for more information.

Installation

Add this line to your application's Gemfile:

gem 'reevoocop', require: false

And then execute:

$ bundle

Or install it globally with:

$ gem install reevoocop

Usage

In a Rakefile:

require 'reevoocop/rake_task'
ReevooCop::RakeTask.new(:reevoocop)

This can be quite dramatic if you haven't been using a style checker previously and you have, say, 10 years of code written. Why not only lint files changed in the last N commits? This also makes reevoocop much faster in large codebases as you only have to lint recently changed files.

require 'reevoocop/rake_task'
ReevooCop::RakeTask.new(:reevoocop) do |task|
  task.patterns = reevoocop_files(5)
  task.options = ['-D'] # Dispays name of failing cop in output. 
  exit if task.patterns == []
end

def reevoocop_files(pedantry)
  `git diff-tree --no-commit-id --name-only -r HEAD~#{pedantry} HEAD`
    .split("\n").select { |f| f.match(/(\.rb\z)|Rakefile/) && File.exist?(f) && !f.match(/db/) }
end

You can also use Reevoocop stand-alone:

$ reevoocop

If you are introducing reevoocop to an existing project, or bumping the reevoocop version try:

$ reevoocop -a

Anything that can be auto corrected will be, this will save you a lot of time!

Configuring / Contributing

  1. You can't configure this, thats the point.
  2. If you need to change our style guidelines, update the lib/reevoocop.yml file and open a pull request.
  3. If you have a good reason to break the guidelines, you can switch off the cop for the code like this.
  4. Please don't open a pull request unless you work at Reevoo, if you don't but would like to, look at our website!

About

20% MonkeyPatch, 80% YAML, 100% Style

Resources

Readme
MIT license
Activity
Custom properties

Stars

1 star

Watchers

5 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.