GithubHelp home page GithubHelp logo

prontolabs / pronto-reek Goto Github PK

View Code? Open in Web Editor NEW
29.0 6.0 19.0 54 KB

Pronto runner for Reek, code smell detector for Ruby

License: MIT License

Ruby 100.00%
pronto pronto-runner ruby smell-detector analyzer

pronto-reek's Introduction

Pronto runner for Reek

Code Climate Build Status Gem Version Dependency Status

Pronto runner for Reek, code smell detector for Ruby. What is Pronto?

Configuration

Configuring Reek via config.reek, or any file ending with .reek, will work just fine with pronto-reek.

You can also specify a custom severity level for the reek smells with the environment variable PRONTO_REEK_SEVERITY_LEVEL.

Or if you prefer provide it on your .pronto.yml (environment variable has precedence over file):

reek:
  severity_level: warning # default is info

pronto-reek's People

Contributors

ashkulz avatar doomspork avatar drowze avatar ermolaev avatar halostatue avatar jeroenj avatar mjacobus avatar mknapik avatar mmozuras avatar mvz avatar paul avatar pboling avatar petergoldstein avatar stevehanna avatar zewelor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pronto-reek's Issues

pronto-reek doesn't respect --exit-code option

I'm experimenting with using reek as part of our CI process however I'm noticing that reek seems to always return 0 (success) even though it logs a number of issues.

Is this the expected behaviour, and if so, can it be overridden?

passing reek command line options (-U)

I love running reek with the -U flag to give links to the documentation related to the smell.

Is there some way to pass these flags through pronto-reek to pronto to adjust the reek output?

Breaks with reek v2.0.2

It works fine on v2.0.1 but breaks on v2.0.2 with the following error:

/Users/jeroen/.gem/ruby/2.2.0/gems/reek-2.0.2/lib/reek/core/smell_repository.rb:22:in `initialize': uninitialized constant Reek::Core::SmellRepository::Configuration (NameError)

I don't know exactly what causes the issues, but it appears that some related code might have changed: troessner/reek@v2.0.1...v2.0.2. I'll try to have a deeper look at it when I find some time.

New Reek violations may not be reported

Given I have the code on GH (path/some_class.rb)

class SomeClass
  def do_stuff
    One.new
    Two.new
    Three.new
    Four.new
    Five.new
  end
end

The current reek status is:

Inspecting 1 file(s):
.

I change the file and create a pull request that changes the file like follows

class SomeClass
  def do_stuff
    One.new
    Two.new
    Three.new
    Four.new
    Five.new
    Six.new
  end
end
Inspecting 1 file(s):
S

/path/pronto_reek.rb -- 1 warning:
  [2]:TooManyStatements: SomeClass#do_stuff has approx 6 statements [https://github.com/troessner/reek/blob/master/docs/Too-Many-Statements.md]

Pronto rubocop will not create any comment on my PR, because the report is on
the method on line 2, which is not part of the changed code.

Now, if I add a comment in the line of the method name (where reek reports the
violaiton) and update the PR, I will get a comment from pronto, because line num 2 changed.

class SomeClass
  def do_stuff # now it reports
    One.new
    Two.new
    Three.new
    Four.new
    Five.new
    Six.new
  end
end

It is a bug, isn't it? The new code created a violation in the existing code.

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.