Enhancement: Validate template variables

Open
#107 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
java
Domain
tooling

Research direction

The issue does not name any files, tests, or entry points. Start by locating where user templates are added and compiled, then determine how variables are declared and which missing or invalid variables should fail. Done means template validation happens before code generation and reports actionable missing-variable errors.

Written by the indexing model from the issue text.

Description

I think that it would be nice addition if we validate the variables in a template when a user adds them. This will help the users to see if they are using the templates wrong and can suggest missing variables. This can also help when a new mandatory variable is added to a template, it will cause a failure even before the code is generated.

This can be considered as a fail fast approach. The templates written by the users need to be compilable of course.

Dominant language
Java
Stars
72
Forks
47
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from assertj/assertj-generator

All issues in assertj/assertj-generator

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.