rubycritic icon indicating copy to clipboard operation
rubycritic copied to clipboard

Settings file

Open davidgomes opened this issue 9 years ago • 9 comments

Instead of having settings purely as flags, it would be interesting to have a configuration file, which could be ported and used across several projects.

davidgomes avatar Feb 26 '15 18:02 davidgomes

I agree, I think a rubycritic.yml file would be a good candidate for how we handle settings.

natesholland avatar Mar 06 '15 17:03 natesholland

In debt_ceiling I use the Confirguations gem, and read in a ruby file with rails like configuration block... I think I prefer that to yml, but agree having settings/config is a good idea.

bglusman avatar Mar 21 '15 13:03 bglusman

+1. It would be great to specify in a config file which folders ruby critic should critique.

johnkelly avatar May 03 '15 21:05 johnkelly

Agree, would be useful. Would somebody like to take a stab at this? ;)

troessner avatar Dec 31 '15 11:12 troessner

The same comment I wrote for #11 applies here:

Due to RC's nature this is not really trivial since we aggregate multiple tools and those tools have a different understanding of how you can exclude and include paths. And some might not even offer an "exclude" functionality. Nevertheless I can see that this feature would be highly valuable.

;)

troessner avatar Jan 07 '16 12:01 troessner

I am working on this, using yml (rubycritic.yml) file.

nav16 avatar Nov 26 '16 18:11 nav16

@nav16 Any updates on this? I have a project right now where we patch a gem and it is very picky about how we patch it. This file is the only thing that's not an 'A' and is keeping me from doing a -s 100 on our ci build

westlakem avatar Feb 17 '17 14:02 westlakem

It would be nice if the rubycritic config was basically just an extended version of the Reek config — so we could copy our current Reek configuration into it, and add other configuration options for the other tools (flog, flay, etc.) and for rubycritic itself.

Or maybe provide a rubycritic config directory that can contain config files specific to each tool (e.g., .rubycritic/.reek).

In particular, I want to be able to configure skipping some of the checks from Flog and Flay (e.g., HighComplexity, DuplicateCode) for specific directories (e.g., spec), without having to ignore those directories for everything else.

Right now, my rubycritic my report gets filled up with lots of complexity and duplicate code smells from my spec directory, unless I don’t include the spec directory (and miss out on reporting the code smells I do want to see for specs).

Thanks!

grantneufeld avatar Aug 10 '17 20:08 grantneufeld

I guess this can be closed, since we can use .reek.yml as a configuration file.

piacsek avatar May 30 '22 18:05 piacsek