|
|
The toolbox offers multiple ways of accessing its functionality: via CLI, via RESTful APIs, and via the dashboard.
|
|
|
This wiki page will focus on explaining the usage through the CLI, since the APIs are meant for development and the dashboard mimics the same functionality and requires little configuration.
|
|
|
|
|
|
All the analyses performed do not require compilation of the source code.
|
|
|
|
|
|
# Usage from CLI
|
|
|
Assuming that you have cloned and created the executable JAR file following the installation instruction, you can execute the following commands to have the list of options for each tool:
|
|
|
```
|
|
|
java -jar path/to/astracker.jar -h
|
|
|
java -jar path/to/arcan-java.jar -h
|
|
|
java -jar path/to/arcan-c.jar -h
|
|
|
```
|
|
|
|
|
|
## Java projects
|
|
|
To trigger the most basic analysis on a Java project stored in a Git repository you need to first run the following:
|
|
|
```
|
|
|
java -jar path/to/arcan.jar-p $INPUTDIR -out $OUTDIR_ARCAN -git -branch $BRANCH -nDays $INTERVAL_GIT_COMMITS -startDate $STARTDATE
|
|
|
```
|
|
|
This will trigger an analysis for the given repository stored in `$INPUTDIR` on the given branch and analysing one commit every `$INTERVAL_GIT_COMMITS` days starting from `$STARTDATE` (format YYYY-MM-DD).
|
|
|
|
|
|
After the Arcan finishes, you will find a number of `.graphml` files in the `$OUTDIR_ARCAN` directory. These files are the input to AStracker.
|
|
|
|
|
|
```
|
|
|
java -jar path/to/astracker.jar -p $PROJECT -i $OUTDIR_ARCAN -o $OUTPUTDIR -pC -pCC -gitRepo $INPUTDIR -jP
|
|
|
```
|
|
|
where `$PROJECT` is the name of your project (arbitrary).
|
|
|
This should trigger the analysis and as soon as the analysis is complete, a number of CSV files will be saved under `$OUTPUTDIR/trackASOutput/$PROJECT` containing the smells, their characteristics, and the historical information of each commit analysed, including the number of changes to each class/package.
|
|
|
|
|
|
# C/C++ projects
|
|
|
For C/C++ projects, you need to run the following
|
|
|
|
|
|
|
|
|
|