diff --git a/devNotes/sanityCheck.md b/devNotes/sanityCheck.md index 1f69effd24ce2dd07c56edd0e18fd1f2b59bb31d..2c31933c8f94702d9dfcb55da14be75d5d99d466 100644 --- a/devNotes/sanityCheck.md +++ b/devNotes/sanityCheck.md @@ -22,30 +22,49 @@ It is generally advised to use the java check if possible. The java check has 3 main parts: -1. A checks for correct closure of all SugarCube macros and HTML tags in the .tw files. +1. A checks for correct closure of all SugarCube macros and HTML tags in the + .tw files. -2. A check to find variable names that are only used once to find misspelled variables and leftovers from removed variables. +2. A check to find variable names that are only used once to find misspelled + variables and leftovers from removed variables. -3. A search through all files against a dictionary to find common misspellings and deprecated code. +3. A search through all files against a dictionary to find common misspellings + and deprecated code. -Because it provides some functionality that overlap with the `git grep` calls, the corresponding calls are ignored when this check is run since the java program is generally faster and produces less false positives. +Because it provides some functionality that overlap with the `git grep` calls, +the corresponding calls are ignored when this check is run since the java +program is generally faster and produces less false positives. ### Maintenance -In order to keep the number of false positives to a minimum this check has to be regularly maintained: +In order to keep the number of false positives to a minimum this check has to be +regularly maintained: -1. When new macros or HTML tags are introduced in the project code they have to be added to `devTools/javaSanityCheck/twineTags` or `devTools/javaSanityCheck/htmlTags`. +1. When new macros or HTML tags are introduced in the project code they have to + be added to `devTools/javaSanityCheck/twineTags` or + `devTools/javaSanityCheck/htmlTags`. -2. When removing variables they often have a reference left in some kind of BC related code. This is a common example when a false positive occurs and that variable has to be added to `devTools/javaSanityCheck/ignoredVariables`. +2. When removing variables they often have a reference left in some kind of BC + related code. This is a common example when a false positive occurs and that + variable has to be added to `devTools/javaSanityCheck/ignoredVariables`. -3. When fully removing variables that were ignored, they have to be removed from `devTools/javaSanityCheck/ignoredVariables` too. +3. When fully removing variables that were ignored, they have to be removed + from `devTools/javaSanityCheck/ignoredVariables` too. -4. When adding variables it can happen that only one usage is identified by the check, which means that it throws a false positive. To remove this add the variable to `devTools/javaSanityCheck/ignoredVariables`. When the variable is used in more places later and found more than once it has to be removed again to keep the check as efficient as possible. +4. When adding variables it can happen that only one usage is identified by the + check, which means that it throws a false positive. To remove this add the + variable to `devTools/javaSanityCheck/ignoredVariables`. When the variable + is used in more places later and found more than once it has to be removed + again to keep the check as efficient as possible. -5. When you find common missspellings you can add them to `devTools/dictionary_phrases.txt` or `devTools/dictionary_wholeWord.txt`. +5. When you find common missspellings you can add them to + `devTools/dictionary_phrases.txt` or `devTools/dictionary_wholeWord.txt`. -6. When a file produces so many false positives that they are impossible to clean up it may be added to `devTools/javaSanityCheck/excluded`. +6. When a file produces so many false positives that they are impossible to + clean up it may be added to `devTools/javaSanityCheck/excluded`. ### Source code -The source code can either be found at [gitgud.io](https://gitgud.io/Arkerthan/twine-sanitycheck) or, in case the repo is inaccessible, in a zip file at `devTools/javaSanityCheck/sources.zip`. +The source code can either be found at +[gitgud.io](https://gitgud.io/Arkerthan/twine-sanitycheck) or, in case the repo +is inaccessible, in a zip file at `devTools/javaSanityCheck/sources.zip`.