@@ -23,7 +23,7 @@ class AssignmentCreateCommand extends CommanderCommand {
.option('-c, --clone [string]','automatically clone the repository (SSH required) in the specified directory (this will create a subdirectory with the assignment name)')
.action(this.commandAction.bind(this));
if (SharedConfig.useSonar){
if (SharedConfig.sonar.enabled){
this.command.requiredOption('-s, --sonar','add sonar to the code checking process for exercises derived from the assignment');
}
}
...
...
@@ -32,6 +32,7 @@ class AssignmentCreateCommand extends CommanderCommand {
letmembers!:Array<GitlabUser>|false;
lettemplateIdOrNamespace:string|null=null;
letassignment!:Assignment;
letsonar=false;
// Check access and retrieve data
{
...
...
@@ -46,6 +47,14 @@ class AssignmentCreateCommand extends CommanderCommand {
return;
}
constassignmentGetSonarSpinner:ora.Ora=ora('Checking server sonar status').start();