You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(cli): wheels generate model writes misformatted CFC with orphan blank lines #2329
`wheels generate model ` produces a CFC with multiple orphan blank lines and inconsistent indentation inside `config()`. The tutorial chapter 2 tells users to overwrite the file immediately, so this isn't a tutorial blocker — but a user running the generator outside the tutorial flow gets oddly-formatted output.
Repro
$ wheels generate model Post title:string body:text
$ cat app/models/Post.cfc
component extends="Model" {
function config() {
validatesPresenceOf("title,body");
}
}
Three orphan blank lines, and the `validatesPresenceOf` line has ~12-space indentation instead of the 8 spaces the surrounding lines use.
Expected
component extends="Model" {
function config() {
validatesPresenceOf("title,body");
}
}
Suggested fix
The codegen template for the model body — likely under `cli/lucli/templates/codegen/Model*.txt` — has unconditional blank lines around optional sections (validations, associations, callbacks), and the validation line is indented from a deeper template context. Either trim leading/trailing blanks per-section in the template, collapse consecutive blank lines on render, or normalize indentation to the enclosing scope.
Severity
Minor (cosmetic). Tutorial users overwrite the file in the next step; non-tutorial users get odd-looking but functional code.
Activity
test(test): expand onboarding harness for 2026-04-27 fresh-vm findings (
fix(cli): clean up orphan whitespace and over-indent in generated mod…