grantspeelman / guard-reek Goto Github PK
View Code? Open in Web Editor NEWGuard::Reek is a Guard plugin for Reek
License: MIT License
Guard::Reek is a Guard plugin for Reek
License: MIT License
In Rubocop and Rspec, the output of the results in Guard is much cleaner, using green to show positive results and red to show negative. It would be much easier if Reek worked similarly: at the end of each run, print how many total offenses were found (in red) or print a green "no offenses found" message if none were found.
Thank you :)
Versions:
Gem name | Version |
---|---|
guard-reek |
1.0.2 |
guard |
2.14.0 |
rake |
12.0.0 |
Relevant extract from my Guardfile
:
guard 'reek' do
watch(%r{^lib/(.+)\.rb$})
watch('config.reek')
end
Analogous task in Rakefile
:
Reek::Rake::Task.new do |t|
t.config_file = 'config.reek'
t.source_files = 'lib/**/*.rb'
t.reek_opts = '--sort-by smelliness --no-progress -s'
end
Hilarity ensues: Reek should not inspect the ./gemsets
directory; it has been configured to inspect only ./lib
.
[1] guard(main)> .find lib test -name \*.rb | wc -l
6
[2] guard(main)> .find gemsets -name \*.rb | wc -l
3441
[3] guard(main)> reek
01:47:41 - INFO - Run Reek
01:47:41 - INFO - Guard::Reek is running on all files
01:47:41 - INFO - Guard::Reek running on all
Inspecting 3446 file(s):
.SS..SS.SSSSSSSSSSSSSSSSSSSSSSS..SSSSSSS.S.S.....S......SS..S...........................................SSSSSSSSSSSSSSSSSSSSSSS.S^C/usr/local/opt/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/ast-2.3.0/lib/ast/node.rb:66:in `hash': Interrupt
from /usr/local/opt/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/ast-2.3.0/lib/ast/node.rb:66:in `initialize'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/gemsets/dev/gems/parser-2.3.3.1/lib/parser/builders/default.rb:1182:in `new'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/gemsets/dev/gems/parser-2.3.3.1/lib/parser/builders/default.rb:1182:in `n'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/gemsets/dev/gems/parser-2.3.3.1/lib/parser/builders/default.rb:608:in `arg'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/gemsets/dev/gems/parser-2.3.3.1/lib/parser/ruby23.rb:6276:in `_reduce_526'
from /usr/local/opt/rbenv/versions/2.3.3/lib/ruby/2.3.0/racc/parser.rb:259:in `_racc_do_parse_c'
from /usr/local/opt/rbenv/versions/2.3.3/lib/ruby/2.3.0/racc/parser.rb:259:in `do_parse'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/gemsets/dev/gems/parser-2.3.3.1/lib/parser/base.rb:162:in `parse'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/gemsets/dev/gems/parser-2.3.3.1/lib/parser/base.rb:179:in `parse_with_comments'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/gemsets/dev/gems/parser-2.3.3.1/lib/parser/base.rb:50:in `parse_with_comments'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/gemsets/dev/gems/reek-4.5.2/lib/reek/source/source_code.rb:88:in `syntax_tree'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/gemsets/dev/gems/reek-4.5.2/lib/reek/examiner.rb:138:in `syntax_tree'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/gemsets/dev/gems/reek-4.5.2/lib/reek/examiner.rb:120:in `run'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/gemsets/dev/gems/reek-4.5.2/lib/reek/examiner.rb:87:in `smells'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/gemsets/dev/gems/reek-4.5.2/lib/reek/examiner.rb:103:in `smelly?'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/gemsets/dev/gems/reek-4.5.2/lib/reek/report/formatter/progress_formatter.rb:43:in `progress'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/gemsets/dev/gems/reek-4.5.2/lib/reek/report/text_report.rb:21:in `add_examiner'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/gemsets/dev/gems/reek-4.5.2/lib/reek/cli/command/report_command.rb:24:in `block in populate_reporter_with_smells'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/gemsets/dev/gems/reek-4.5.2/lib/reek/cli/command/report_command.rb:23:in `each'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/gemsets/dev/gems/reek-4.5.2/lib/reek/cli/command/report_command.rb:23:in `populate_reporter_with_smells'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/gemsets/dev/gems/reek-4.5.2/lib/reek/cli/command/report_command.rb:15:in `execute'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/gemsets/dev/gems/reek-4.5.2/lib/reek/cli/application.rb:29:in `execute'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/gemsets/dev/gems/reek-4.5.2/bin/reek:13:in `<top (required)>'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/bin/reek:17:in `load'
from /Users/jeffdickey/src/conversagence/service_catalogue/v1/service_catalogue_uc_v1/bin/reek:17:in `<main>'
[1] guard(main)>
[1] guard(main)>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.