This repository was archived by the owner on Jun 3, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
src/main/java/fi/helsinki/cs/tmc/cli/command Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ public class SubmitCommand extends AbstractCommand {
3838 private Io io ;
3939 private boolean showAll ;
4040 private boolean showDetails ;
41+ private boolean filterUncompleted ;
4142
4243 @ Override
4344 public void getOptions (Options options ) {
@@ -70,15 +71,15 @@ public void run(CliContext context, CommandLine args) {
7071 }
7172
7273 List <String > exerciseNames ;
73- if (args . hasOption ( "c" ) ) {
74+ if (filterUncompleted ) {
7475 workDir .addPath (workDir .getCourseDirectory ());
7576 exerciseNames = workDir .getExerciseNames (true , true );
7677 } else {
7778 exerciseNames = workDir .getExerciseNames ();
7879 }
7980
8081 if (exerciseNames .isEmpty ()) {
81- if (args . hasOption ( "c" ) && workDir .getCourseDirectory () != null ) {
82+ if (filterUncompleted && workDir .getCourseDirectory () != null ) {
8283 io .println ("No locally tested exercises." );
8384 return ;
8485 }
@@ -209,6 +210,7 @@ private void checkForExerciseUpdates(Course course) {
209210 private String [] parseArgs (CommandLine args ) {
210211 this .showAll = args .hasOption ("a" );
211212 this .showDetails = args .hasOption ("d" );
213+ this .filterUncompleted = args .hasOption ("c" );
212214 return args .getArgs ();
213215 }
214216}
You can’t perform that action at this time.
0 commit comments