Calculating the Truck-Factor of Popular GitHub Applications
###Environment The scripts for extract commit information from git repositories were developed using Shell and AWK. So, the execution environment must support those script languages. Optionally, the ruby interpreter is required if you decide to use the Linguist library to automatically discard files like documentation and third-party libraries. See the specific Linguist requirements in linguist page.
###Usage
Get the last version of the truckfactor-tool
In order to run the tool you need to perform some steps:
-
Clone the repository to be analysed.
- example:
git clone https://github.com/mtov/Truck-Factor.git
- example:
-
Use the scripts in the folder
scripts
to extract information from the git repository to be analyzed: -
Extract commit and file information. - command:
./commit_log_script.sh <git_repository_path>
- example:./commit_log_script.sh git/truck-factor
-
Extract files to be discard using Linguist library (Optional) - command:
./linguist_script.sh <git_repository_path>
- example:./linguist_script.sh git/truck-factor
-
Execute the gittruckfactor tool.
- command:
java –jar gittruckfactor.jar <git_repository_path> <git_repository_fullname>
- example:
java –jar gittruckfactor.jar git/truck-factor mtov/Truck-Factor
- command:
###Optional Settings
Repository specifc information can be provided using the files in the folder repo_info
.
That information can improve the TF calculation results. The additional information supported are:
- Filtered files (
filtered-files.txt
): set files that must be discard before start the TF calculation.- Info pattern:
<git_repository_fullname>;<file_path>;<filter_info>
- Info pattern:
- Aliases (
alias.txt
): set developers aliases.- Info pattern:
<git_repository_fullname>;<developer_alias1>;<developer_alias2>
- Info pattern:
- Modules (
modules.txt
): map files to modules.- Info pattern:
<git_repository_fullname>;<file_path>;<module_name>
-
- Module calculation not implemented yet.
- Info pattern: