-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Build on RuboCop infrastructure #1512
Comments
I think this is a fantastic idea well worth pursuing. |
This sounds great and very efficient, but not quite around the corner… 😊 Would you accept a PR that will always check against expanded paths meanwhile? Directories in the config file would be expanded from the config file dir, and any passed file from the current dir. |
@elia yes, PRs that fix outstanding issues are always welcome! This proposal will definitely take some time. So I'm guessing it will probably be done for Reek 7. |
Just a heads up. I plan to extract the parts of RuboCop that are essentially tools built on top of Parser, such as the node patterns and node extensions, into its own gem. I can't say when this will happen, but hopefully that will be helpful to this project as well. 🙂 |
One more vote in favour of this proposal. I think that sharing the same foundation between multiple lint tools will be beneficial for everyone. I've been thinking for a while for a gem like the one mentioned by @Drenmi (think of it as |
Came here looking for guidance on a
As of Release 0.81.1 [current], RuboCop depends on |
@jdickey it looks like you're using an older version of reek. The current version will allow use with parser 2.6 and 2.7: $ gem depend reek
[...]
Gem reek-5.6.0
codeclimate-engine-rb (~> 0.4.0)
kwalify (~> 0.7.0)
parser (< 2.8, >= 2.5.0.0, != 2.5.1.1)
psych (~> 3.1.0)
rainbow (>= 2.0, < 4.0) |
I don't think so, unless they can actually use that platform-level stuff. Using such a gem purely for the transient dependencies would be overkill. There are several easy options for gems to stay up-to-date with their dependencies. It makes more sense to use those. |
@mvz About your first response: That's what I get; I'm pretty sure I'm using 5.6.0, as it's also the version listed in my
About your second response: Yeah, I think you're probably right. It's been my occasional experience, though, that relying on a trusted, well-maintained base platform that offers a superset of the dependencies and basic behaviours you're after, is often a wise investment. I'd particularly note the (current) release frequency of Reek vs RuboCop; they do a bang-up job of getting fast fixes/updates out to the users (which I'd expect to slow down just a touch once they ship 1.0.0.) (I just started some maintenance-level changes to a project I hadn't touched in just over a year, and was startled to realise that it last used RuboCop 0.59.2 (2018/09/24), and the current is 0.80.1. Yes, cleanup changes shaved the yak for a couple of hours.) |
That's odd, since your bundler output says:
I wonder what forces reek down to 5.2.0. Neither skunk nor rubycritic seem to force that. This is mostly a Bundler issue (it's not doing the best job explaining itself in this case), but you could try setting RuboCop's release frequency is indeed quit a lot higher than Reek's. I'd like to think that is mostly due to its pre-1.0 status. |
That is odd, since
and looking in the installed-Gem repository, one finds
Interestingly,
So furious head scratching |
Hm. I think we're firmly in rvm+bundler territory now. Maybe you can ask on one of those projects' support forums? |
I think you're likely right. Blast. Thanks anyway. |
This is something I've been thinking about for some time.
There have been quite a few long-standing issues in the tracker that are not about Reek's core functionality. These have to do with configuration, the todo file, and the inability to make Reek process files that do not end in
.rb
.excluded_paths
configuration #1429, Use XDG standard for finding config files? #1417, Reek does not handle relative paths from config file #1283, and Clean up config handling #667.excluded_paths
configuration #1429, Validate the data types given to our basic and custom configuration options via source code comment #1145, Add reporting of unneeded inline suppressions #961.In addition, there are quite a few different strategies being used for finding smelly code and we do not have one preferred way.
The rubocop project has done all the work of creating a working config file system with all the features our users have been asking for, a great to do file generation system, and an unneeded suppression detector. In addition, it has a nice system for matching s-expressions with certain patterns, as I mentioned before.
I would like to propose re-using some or all of these features for Reek. This would involve something like:
.reek.yml
. This would mean adopting rubocop's file formatA more extreme option would be to transform reek into a rubocop plugin (i.e., rubocop-reek), and keep the
reek
executable as a thin layer over that, just to load the correct configuration.The text was updated successfully, but these errors were encountered: