apache / apache/grails-core

Template files have wrong file extension

Open
#14,271 4 comments 0 reactions 0 assignees View on GitHub
relates-to: scaffolding
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

It's pretty annoying that groovy scaffolding template files in src/main/templates have the file extension .groovy because IDEs assume they are groovy files and annoy you forever that their syntax is invalid. In point of fact, they are not groovy files, they are a mish mash of groovy and some other stuff. Just like Microsoft Excel templates have different file extension (.xlsx) compared to regular Excel files (.xls), these non-groovy half-groovy templates deserve their own file extension, such as .groovyt or something. I could say the same thing about .gsp template files, should be .gspt.

Who knows... if you differentiate them thus, Jetbrains might even write a syntax checker for them.

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the Groovy scaffolding templates under src/main/templates and tracing where their current .groovy and .gsp extensions are referenced. Decide the intended distinct extensions for these mixed-content templates, update the relevant references, and verify that regular Groovy and GSP files are not affected.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy
Domain
developer-experience
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.