You are looking at the developer documentation for the most recent public release of RepoSense. The version matching the latest master branch is here.

Appendix: CLI syntax reference

The section below provides explanations for flags used in system testing. For other flags, please visit the CLI syntax reference under Appendix section of User Guide.

--test-mode

--test-mode: Enables test mode behavior.

  • Used in ConfigSystemTest.
  • Some test cases requires AuthorConfiguration.hasAuthorConfigFile to be set to false to pass. The exact reason is unknown as the test cases are pretty old to track back. Tracing this shows that there is something to do with AnnotatorAnalyzer.findAuthorInLine() where AuthorConfiguration.hasAuthorConfigFile() is called.
  • Can be used for behaviors specific to test code.
    • E.g. --fresh-cloning. Fresh cloning is always false when running RepoSense normally, and is only used in system tests.

--fresh-cloning

--fresh-cloning: Clones the repo again if it has been cloned before.

  • Used in ConfigSystemTest.
  • Some test cases performs shallow cloning while some does not. Fresh cloning ensures that the test cases that does not perform shallow cloning will clone the repo again if the previous test case uses shallow cloning, ensuring correctness of the analysis.
  • Requires --test-mode flag to be enabled.