Skip to content

Validate Command

Runs readiness checks on the roster and a specific assignment. Always run validation before repo create to catch problems early.

Terminal window
redu validate --assignment "Project 1" --course seed-course

Roster checks:

  • Duplicate email addresses across students and staff
  • Missing required fields (name, email)
  • Students without Git usernames (needed for repository creation)
  • Orphaned group members (references to students no longer in the roster)
  • Empty groups with no active members

Assignment checks:

  • Assignment exists and is linked to a valid group set
  • Repository names are unique across all groups
  • Repository template is accessible (if configured)
  • Git connection and organization are configured

If all checks pass:

Validation passed for assignment 'Project 1' in course 'seed-course'.

Exit code: 0

If issues are found, each one is printed with the kind of problem and affected members or groups:

Validation issues for assignment 'Project 1':
- missing_git_username: 3 students have no Git username (alice@example.com, bob@example.com, carol@example.com)
- empty_group: Group 'Team Delta' has no active members

Exit code: 1

The exit code makes validate useful in CI or shell scripts:

Terminal window
redu validate --assignment "Project 1" && redu repo create --assignment "Project 1"

This creates repositories only if validation passes.