rubycritic icon indicating copy to clipboard operation
rubycritic copied to clipboard

When specify more directories = mess in git repository

Open Strnadj opened this issue 9 years ago • 5 comments

We have multiple libraries in our project (rails engines), if we specified them for rubycritic

rubycritic components/ui/app components/ui/lib components/core/app

it works well, but it creates for each file in components/**/.rbdirectory html report file with same name + html and it is a big problem. We are able to gitignore tmp directory, but we can't ignore all html files...

I try to set manually rubycritic .... -p tmp/rubycritic, but it does not help. Maybe i've missed something in configuration?

Strnadj avatar Jun 27 '16 06:06 Strnadj

Hmm, this deserves some investigation indeed. Thanks for the info.

nunosilva800 avatar Jun 27 '16 11:06 nunosilva800

We have appx 10 components in components/*/... because we don't want to check specs + dummy applications the result is sth like:

rubycritic components/ui/app components/ui/lib components/ui/lib components/core/app components/ext_services/app components/ext_services/lib -p tmp/rubycritic

If you want more info, please tell me what exactly do you need ... ;-)

Strnadj avatar Jun 27 '16 11:06 Strnadj

I figure it out. Unfortunattely my informations were incorrect, I am calling rubycritich with absolute paths:

rubycritic /Users/strnadj/Projects/test/components/ui/app /Users/strnadj/Projects/test/components/ui/lib /Users/strnadj/Projects/test/components/ui/lib /Users/strnadj/Projects/test/components/core/app /Users/strnadj/Projects/test/components/ext_services/app components/ext_services/lib -p tmp/rubycritic

And that was the problem, because path to render for html file is defined via: root_directory + @pathname.dirname and it did not care about directory position, maybe specify root project directory will be helpful? @Onumis you can close it if you can...

Strnadj avatar Jul 17 '16 06:07 Strnadj

@Strnadj thanks for the info! I'll have a better look at this in the following days but my initial though is that RubyCritic should "behave well" even if it is fed an absolute path. I'll keep this open.

nunosilva800 avatar Jul 17 '16 11:07 nunosilva800

Fully agree, RC should always behave well or at least warn the user.

troessner avatar Jul 17 '16 12:07 troessner