You are looking at the user documentation for the most recent master
branch of RepoSense (not released to the public yet). The documentation for the latest public release is here.
The command java -jar RepoSense.jar
takes several flags.
Examples:
An example of a command using most parameters:
java -jar RepoSense.jar --repos https://github.com/reposense/RepoSense.git --output ./report_folder --since 31/1/2017 --until 31/12/2018 --formats java adoc xml --view --ignore-standalone-config --last-modified-date --timezone UTC+08 --find-previous-authors --analyze-authorship --originality-threshold 0.66
Same command as above but using most parameters in alias format:
java -jar RepoSense.jar -r https://github.com/reposense/RepoSense.git -o ./report_folder -s 31/1/2017 -u 31/12/2018 -f java adoc xml -v -i -l -t UTC+08 -F -A -ot 0.66
The section below provides explanations for each of the flags.
--analyze-authorship
, -A
--analyze-authorship
: Performs further analysis to distinguish between partial and full credit attribution for
lines of code assigned to the author.
-A
(upper case)--analyze-authorship
or -A
A darker background colour represents full credit, while a lighter background colour represents partial credit.
If the code is attributed to a different author by the user via @@author
tag, then the new author will be given
partial credit.
--assets
, -a
--assets ASSETS_DIRECTORY
: Specifies where to place assets for report generation.
ASSETS_DIRECTORY
The directory containing the assets files. A favicon.ico
file can be placed here to customize the favicon of the dashboard, while a title.md
file can be placed to customize the title of the report using Markdown syntax.-a
--assets ./assets
or -a ./assets
--assets
is not specified, RepoSense looks for assets in the ./assets
directory.--config
, -c
--config CONFIG_DIRECTORY
: Specifies that config files located in CONFIG_DIRECTORY
should be used to customize the report.
CONFIG_DIRECTORY
The directory containing the config files. Should contain a repo-config.csv
file. Optionally, can contain an author-config.csv
file or/and a group-config.csv
file or/and a report-config.json
file or/and a blurbs.md
file.-c
java -jar RepoSense.jar --config ./config
--repos
. The --repos
flag will take precedence over this flag.--repos
and --config
are not specified, RepoSense looks for config files in the ./config
directory.--formats
, -f
--formats LIST_OF_FORMATS
: Specifies which file extensions to be included in the analysis.
LIST_OF_FORMATS
A space-separated list of file extensions that should be included in the analysis.-f
--formats css fxml gradle
or -f css fxml gradle
Binary file formats, such as jpg
, png
,exe
,zip
, rar
, docx
, and pptx
, all will be labelled as the file type binary
in the generated report.
--find-previous-authors
, -F
--find-previous-authors
: Utilizes Git blame's ignore revisions functionality, RepoSense will attempt to blame the line changes caused by commits in the ignore commit list to the previous authors who altered those lines (if available).
-F
(uppercase F)--find-previous-authors
or -F
--help
, -h
--help
: Shows the help message.
-h
Cannot be used with any other flags. This flag takes precedence over all other flags.
--ignore-standalone-config
, -i
--ignore-standalone-config
: Specifies that the standalone config file in the repo should be ignored.
-i
--ignore-standalone-config
or -i
This flag overrides the Ignore standalone config
field in the CSV config file.
--ignore-filesize-limit
, -I
--ignore-filesize-limit
: Specifies that the file size limit (both default and user-defined) should be ignored during the analysis.
-I
--ignore-filesize-limit
or -I
All files are subject to a default file size limit or a custom size limit set by the user. Most files should not be affected by the default size limit. This flag can be useful for including files in your report that are affected by the size limit. Note that this flag may result in large report sizes and/or slower report generation.
This flag overrides the Ignore file size limit
field in the CSV config file.
--last-modified-date
, -l
--last-modified-date
: Specifies that the last modified date of each line of code should be added to authorship.json
.
authorship.json
-l
(lowercase L)--last-modified-date
or -l
--shallow-cloning
. This may result in an incorrect last modified date.--timezone
flag.--originality-threshold
, -ot
--originality-threshold [VALUE]
: Specifies the cut-off point for partial and full credit
in --analyze-authorship
. Author will be given full credit if their contribution exceeds this threshold, else partial
credit is given.
VALUE
Optional. Acceptable range: [0.0, 1.0].0.51
-ot
--originality-threshold 0.66
or -ot 0.66
--analyze-authorship
flag.originality score
, is calculated using Levenshtein Distance (Edit Distance) algorithm.
We compare the difference between current code line and its previous versions.--output
, -o
--output OUTPUT_DIRECTORY
: Indicates where to save the report generated.
OUTPUT_DIRECTORY
The location for the generated reposense-report
folder.-o
--output ./foo
or -o ./foo
(the report will be in the ./foo/reposense-report
folder)--period
, -p
--period PERIOD
: Specifies the period of analysis window.
PERIOD
The period of analysis window, in the format nd
(for n days) or nw
(for n weeks). It is used to calculate end date if only start date is specified, or calculate end date if only start date is specified.-p
--period 30d
or --period 4w
--since d1
. The program will throw a warning.--since
and --until
. The program will throw an exception.--repo
, --repos
, -r
--repo REPO_LOCATION
: Specifies which repositories to analyze.
REPO_LOCATION
A list of URLs or the disk location of the Git repositories to analyze, separated by spaces.-r
--repos https://github.com/reposense/RepoSense.git
--repo https://github.com/reposense/RepoSense.git c:/myRepose/foo/bar
: analyzes the two specified repos (one remote, one local) and generates one report containing details of both.Cannot be used with --config
. This flag takes precedence over --config
.
--shallow-cloning
, -S
--shallow-cloning
: Clones repositories using Git's shallow cloning functionality, which can significantly reduce the time taken to clone large repositories. However, the flag should not be used for smaller repositories where the .git
file is smaller than 500 MB, as it would create overhead.
-S
(uppercase S)--shallow-cloning
or -S
Cannot be used with --last-modified-date
. This may result in an incorrect last modified date.
--since
, -s
--since START_DATE
: Specifies the start date for the period to be analyzed.
START_DATE
The first day of the period to be analyzed, in the format DD/MM/YYYY
.-s
--since 21/10/2017
or -s 21/10/2017
d1
is specified as the start date (--since d1
or -s d1
), then the program will search for the earliest commit date of all repositories and use that as the start date.d1
is specified together with --period
, then the program will warn that the date range being analyzed may be incorrect.--timezone
, -t
--timezone ZONE_ID
: Indicates the timezone to be used for the analysis.
ZONE_ID
The timezone in the format ZONE_ID[±hh[mm]]
.-t
--timezone UTC+08
or -t UTC-1030
--until
, -u
--until END_DATE
: Specifies the end date of the analysis period.
END_DATE
The last date of the period to be analyzed, in the format DD/MM/YYYY
.-u
--until 21/10/2017
or -u 21/10/2017
Note: If the end date is not specified, the date of generating the report will be taken as the end date.
--version
, -V
--version
: Shows the version of RepoSense.
-V
(upper case)Cannot be used with any other flags. This flag takes precedence over all other flags other than --help
.
--view
, -v
--view [REPORT_FOLDER]
: Specifies that the report should be opened in the default browser.
REPORT_FOLDER
Optional. If specified, no analysis will be performed and the report specified by the argument will be opened../reposense-report
-v
--view
or -v