Tabs/spaces in generated Grails project

49 views
Skip to first unread message

Ronny Løvtangen

unread,
Feb 26, 2015, 1:38:03 PM2/26/15
to grails-de...@googlegroups.com
Now that profiles are introduced (https://github.com/grails/grails-profile-repository), could we do a cleanup in usage of tabs/spaces before Grails 3 is released?
I find it a little annoying that every new Grails project is polluted with inconsistent use of tabs/spaces right from the start.

A quick look at the different files shows the inconsistency:

4 spaces
logback.groovy
Bootstrap.groovy
misc templates (Domain, Service, Controller etc)

Mix of 2 and 4 spaces
build.gradle
application.yml

Tabs
application.js
errors.css
mobile.css
main.gsp
error.gsp
index.gsp

Mix of tabs and 4 spaces
main.css
UrlMappings.groovy


It looks like most new files are using 4 spaces. Should that be the default?

Maybe also add an .editorconfig (http://editorconfig.org/) file, as many projects do these days.


Best Regards,
Ronny Løvtangen

Graeme Rocher

unread,
Feb 26, 2015, 1:55:54 PM2/26/15
to grails-de...@googlegroups.com
Pull request welcome. We try to standardise on 4 spaces but it seems we are not very good at it :-/
--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/59195A21-7488-4C82-9048-CE8EA07857B5%40lovtangen.com.
For more options, visit https://groups.google.com/d/optout.


--
Graeme Rocher

Ronny Løvtangen

unread,
Feb 26, 2015, 2:06:15 PM2/26/15
to grails-de...@googlegroups.com
Great, PR coming up :)
An .editorconfig file would be good to add as well then, as it automatically configures many editors/IDEs (e.g. IntelliJ has support by default)

Btw, should I still use Jira, or should I now create a GitHub issue under grails-profile-repository? (ref the note about moving to Github Issues at http://grails.io/post/112130778738/grails-project-infrastructure-update)

Ronny


Graeme Rocher

unread,
Feb 26, 2015, 2:10:47 PM2/26/15
to grails-de...@googlegroups.com
We haven't yet migrated JIRA so a GitHub issue is fine 
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/6882F401-47F2-4ED3-8636-1500BC92F986%40lovtangen.com.

For more options, visit https://groups.google.com/d/optout.


--
Graeme Rocher

Graeme Rocher

unread,
Feb 26, 2015, 2:11:04 PM2/26/15
to grails-de...@googlegroups.com
Sorry a JIRA issue
--
Graeme Rocher

Lari Hotari

unread,
Feb 27, 2015, 1:14:50 PM2/27/15
to grails-de...@googlegroups.com
+1
Reply all
Reply to author
Forward
0 new messages