Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Naming convention for groovy script files

Is there any convention regarding groovy script files naming?

Should I name the script file in camelcase form, like if it was a regular class (i.e. FooBar.groovy)?

Or will it be better to name it using small case letters and underscores (i.e. foo_bar.groovy)?

like image 565
Roman Avatar asked Mar 03 '14 01:03

Roman


Video Answer


1 Answers

I have seen suggestions that say groovy class files should be the camel case just like Java classes, but for groovy scripts, the recommendation was lower case names, at least the first letter. The idea is that you can very easily get an idea of what file is when looking in a directory list or Windows explorer, just by the case of the filename - so scripts starting with lower-case is a good clue.

like image 72
mikemil Avatar answered Sep 29 '22 14:09

mikemil