diff --git a/README.md b/README.md index d0cd9c703..d33fac68c 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ produce an executable jar-file, run the following command: mvn package ``` -This will produce `target/Litterbox-1.7.jar` +This will produce `target/Litterbox-1.8.jar` ## Using LitterBox @@ -37,7 +37,7 @@ This will produce `target/Litterbox-1.7.jar` To see an overview of the command line options available in LitterBox type: ``` -java -jar Litterbox-1.7.jar --help +java -jar Litterbox-1.8.jar --help ``` ### Basic usage @@ -46,7 +46,7 @@ LitterBox parses the JSON file of a Scratch project, which contains its source code. Given such a JSON file, LitterBox is invoked as follows: ``` -java -jar Litterbox-1.7.jar --check --path +java -jar Litterbox-1.8.jar --check --path ``` As a result, LitterBox will report any occurrences of bug patterns or @@ -59,7 +59,7 @@ If you want to check a specific project given its ID (which you can find in the URL of the project), you can use the following command: ``` -java -jar Litterbox-1.7.jar --check --projectid --path +java -jar Litterbox-1.8.jar --check --projectid --path ``` When invoked this way, LitterBox will retrieve the JSON file @@ -75,7 +75,7 @@ project IDs to check in a text file (one project ID per line) and invoke LitterBox as follows: ``` -java -jar Litterbox-1.7.jar --check --projectlist --path +java -jar Litterbox-1.8.jar --check --projectlist --path ``` LitterBox will check the given path for the projects. @@ -91,7 +91,7 @@ filename specified in order to decide whether to produce CSV or JSON output: ``` -java -jar Litterbox-1.7.jar --check --path --output +java -jar Litterbox-1.8.jar --check --path --output ``` The CSV file will contain a high-level summary of the number of @@ -103,7 +103,7 @@ analyzed Scratch-project, where all occurrences of bug patterns are highlighted with comments. ``` -java -jar Litterbox-1.7.jar --check --path --annotate +java -jar Litterbox-1.8.jar --check --path --annotate ``` @@ -119,20 +119,27 @@ comma-separated list of bug patterns, e.g.: ``` -java -jar Litterbox-1.7.jar --check --path --detectors endless_recursion,call_without_definition +java -jar Litterbox-1.8.jar --check --path --detectors endless_recursion,call_without_definition ``` A full list of available bug checkers can be retrieved using: - ``` -java -jar Litterbox-1.7.jar --help +java -jar Litterbox-1.8.jar --help ``` To select all bug patterns, you can also use the term `bugs` in the list; to select all code smell checks use `smells`. +### Deactivating robot finders + +To deactivate finders for the mBlock and Codey Rocky robots set the flag +in the litterbox.properties file to false. This can reduce the run time of +the analysis and the size of a resulting CSV file. +``` +issues.load_mblock=false +``` ### Collecting statistics @@ -140,7 +147,7 @@ LitterBox can produce statistics on code metrics of a project (e.g., number of blocks, number of sprites, weighted method count): ``` -java -jar Litterbox-1.7.jar --stats --path --output +java -jar Litterbox-1.8.jar --stats --path --output ``` ### Automatically refactoring projects @@ -148,7 +155,7 @@ java -jar Litterbox-1.7.jar --stats --path --output \ --refactored-projects @@ -166,7 +173,7 @@ Litterbox produces a file with exactly these rules. It's like a Scratch extracto multiple projects and produces the output to the declared output folder. ``` -java -jar target/Litterbox-1.7-SNAPSHOT.jar -c2v -output -path +java -jar target/Litterbox-1.8-SNAPSHOT.jar -c2v -output -path ``` There are some differences between Scratch and "normal" programming languages like Java, but the most important is, @@ -201,12 +208,21 @@ in Proceedings of the IEEE/ACM 43rd International Conference on Software Enginee To learn more about bug patterns, see the following paper: C. Frädrich, F. Obermüller, N. Körber, U. Heuer, and G. Fraser, “Common bugs in scratch programs,” in Proceedings of - the 25th Annual Conference on Innovation and Technology in Computer - Science Education (ITiCSE), pages 89-95, ACM, 2020. [https://doi.org/10.1145/3341525.3387389](https://doi.org/10.1145/3341525.3387389) +the 25th Annual Conference on Innovation and Technology in Computer +Science Education (ITiCSE), pages 89-95, ACM, +2020. [https://doi.org/10.1145/3341525.3387389](https://doi.org/10.1145/3341525.3387389) To learn more about code perfumes, see the following paper: -F. Obermüller, L. Bloch, L. Greifenstein, U. Heuer, and G. Fraser, "Code Perfumes: Reporting Good Code to Encourage Learners", in Proceedings of the 16th Workshop in Primary and Secondary Computing Education (WiPSCE ’21). ACM, 2021. [https://arxiv.org/abs/2108.06289](https://arxiv.org/abs/2108.06289) +F. Obermüller, L. Bloch, L. Greifenstein, U. Heuer, and G. Fraser, "Code Perfumes: Reporting Good Code to Encourage +Learners", in Proceedings of the 16th Workshop in Primary and Secondary Computing Education (WiPSCE ’21). ACM, +2021. [https://arxiv.org/abs/2108.06289](https://arxiv.org/abs/2108.06289) + +To learn more about code patterns in mBlock robot programs, see the following paper: + +F. Obermüller, R. Pernerstorfer, L. Bailey, U. Heuer, and G. Fraser, "Common Patterns in Block-Based Robot Programs", +in Proceedings of the 17th Workshop in Primary and Secondary Computing Education (WiPSCE ’22). ACM, +2022. [https://doi.org/10.1145/3556787.3556859](https://doi.org/10.1145/3556787.3556859) ## Contributors @@ -232,6 +248,7 @@ Jonas Lerchenberger\ Stephan Lukasczyk\ Miriam Münch\ Florian Obermüller\ +Robert Pernerstorfer\ Gregorio Robles\ Lisa-Marina Salvesen\ Sebastian Schweikl\ diff --git a/pom.xml b/pom.xml index 11ee443b2..63fe2357b 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ de.uni_passau.fim.se2 Litterbox - 1.8-SNAPSHOT + 1.8 diff --git a/src/main/resources/IssueHints_en.properties b/src/main/resources/IssueHints_en.properties index 271c19d31..f3b31b0bb 100644 --- a/src/main/resources/IssueHints_en.properties +++ b/src/main/resources/IssueHints_en.properties @@ -168,7 +168,7 @@ gear_potentiometer_in_bounds=Very nice! You are measuring the potentiometer valu gear_potentiometer_out_of_bounds=You are trying to measure the potentiometer value of the gear of the robot in a range that is not possible. Use a whole number between 0 and 100. interrupted_loop_sensing_robot=The [bc]%BLOCKNAME[/bc] block interrupts the checking of the condition in the [bc]%THENELSE[/bc] block while being executed. It can happen that the condition occurs but your script doesn't react accordingly because it is busy doing the [bc]%BLOCKNAME[/bc] block. Consider doing the condition checking in a separate (parallel) script. led_off_script=Great! You have a script for turning off all LEDs. -led_off_script_missing=LEDs can be switched on, but there is no script to switch them off again. +led_off_script_missing=The LEDs on your robot are still turned on after the program has stopped. Add an LED Off block at the end of your program. line_following_in_bounds=Very nice! You are comparing the value of the line following sensor in the possible range. line_following_out_of_bounds=You are trying to measure a value that can not be detected with the line following sensor. Use a whole number between 0 und 3. loop_sensing_robot=Very good! To ensure that you don\uFFFDt miss an event you continuously check for it in a forever loop.