-
Notifications
You must be signed in to change notification settings - Fork 49
Faq
This page lists common questions and corresponding answers that I pick from various issues as they are raised over time by users of code-forensics. Some of these issues and others are explained more in details in the troubleshooting guide.
Shortly, no. Most of the content of any report page is generated through javascript
and svg
, and even if you used the browser capability to save a page as an html file you would not be able to use any of the dynamic features of the reports, e.g. diagram selection, zooming or filtering.
Running code-forensics on docker is a viable option, especially if you are working on a Windows based OS. I don't provide a docker image of code-forensics, however you may easily build one yourself, if you know docker. Alternatively you can search for a custom made one. For example check out @jdevoo's image at jdevoo/code-forensic.
This may happen when code-forensics cannot extract any commit information for the requested time period of the analysis. Check the input date range and be aware that if no date parameters have been specified code-forensics will only fetch commits created on the current day.
The repository settings affect the way files are filtered in or out of the log files. The rootPath
must point at the root directory of your repository and not a subfolder (not as obvious as it sounds). Also I would recommend to use an absolute file path to avoid a dependency on the directory the analysis is executed from.
The Code Maat program comes with several command line options used to determine the granularity of an analysis. Read its documentation and understand the use of options -n
, -m
, -i
, -x
and -s
and how they can significantly change the output of an analysis. code-forensics allows you to override the default values for those options either through the command line or through the .code-forensics
configuration file.
In the particular scenario where a coupling analysis returns no results, you can try and decrease the values for options -n
and -m
(both default to 5), and see if the output changes. Be aware though that those default values have a meaning, i.e. if you lower -n
and -m
to the minimum possible value (1) you could be induced to think there are significant couplings between files when in fact the number of those occurrences might not actually be relevant.
Why is the system evolution report showing an empty plot even though the generated report files contain data?
The problem here could likely be that the timeSplit
parameter hasn't been provided. This is equivalent to specifying (implicitly) only one data point where the result is the total aggregation of the metrics over a single time period. Being an evolution analysis we want to instruct code-forensics to divide the time interval into a number of periods at the end of which metrics can be collected and data points can be created.
code-forensics reads and writes files using UTF-8 by default. If you need to use Unicode in any configuration file I recommend that you explicitly use JavaScript Unicode escape sequences to represent any special character.
As an example, this is how you could configure a list of contributors with special characters in their names, like
- Björn Åkesson
- José Eduardo
- Nguyễn Tấn Dũng
contributors: [
['Bj\u00f6rn \u00c5kesson'], ['Jos\u00e9 Eduardo'], ['Nguy\u1ec5n T\u1ea5n D\u0169ng']
]