-
Notifications
You must be signed in to change notification settings - Fork 328
Documentation
#summary Documentation covering gitinspector, it's options and how to use them. #labels Featured
= Requirements =
- Git executable defined somewhere in your PATH, otherwise gitinspector will not be able to run git.
- Python 2.6+.
= Running gitinspector =
The program can be executed using two different methods.
= The gitinspector options =
The gitinspector script itself accepts a number of options that modifies it's behaviour and how statistics are generated. It is possible to get a brief explanation of all available options by supplying -h or --help when running the program. Boolean arguments can only be given to long options.
The available options are:
|| -c, --checkout-missing[=BOOL] || || By default, gitinspector will just print out missing files in a list and skip the inclusion of certain statistics from those files. With this option, gitinspector will try to checkout any missing files before computing statistics. || || -f, --file-types=EXTENSIONS || || A comma separated list of file extensions to include when computing statistics. The default file extensions used are: java,c,cpp,h,hpp,py,glsl,rb,js,sql || || -F, --format=FORMAT || New since 0.2.0 || Defines in which format output should be generated; the default format is 'text' and the available formats are: html,htmlembedded,text,xml || || --grading[=BOOL] || New since 0.2.0 || Show statistics and information in a way that is formatted for grading of student project; this is the same as supplying -HlmrTw. || || -H, --hard[=BOOL] || || Track rows and look for duplicates harder. In essence, this passes additional -C (and -M) options to the git executable. || || -l, --list-file-types[=BOOL] || || List all the file extensions available in the current branch of the repository. This can be very useful when you want to check what extensions are available in the repository. These can later be passed to gitinspector using the -f or --file-types options. || || -L, --localize-output[=BOOL] || New since 0.3.0 || By default; the generated statistics are always in English. This flag localizes the generated output to the selected system language if a translation is available. || || -m, --metrics[=BOOL] || || Include checks for certain metrics during the analysis of commits. Currently very simple, but will be expanded. || || -r, --responsibilities[=BOOL] || || Show which files the different authors seem most responsible for. || || --since=DATE || New since 0.2.1 || Show statistics for commits more recent than a specific date. The date format is in approxidate; the same as the format used in git itself. || || -T, --timeline[=BOOL] || || Show commit timeline, including author names. the timeline shows a statistical analysis where the amount of changes is calculated in relation to all other changes made by all other authors a specific month. Using the -w option, it is possible to get this output specified in weeks instead. || || --until=DATE || New since 0.2.1 || Show statistics for commits older than a specific date. The date format is in approxidate; the same as the format used in git itself. || || --tda367 || Deprecated since 0.2.0 || Show statistics and information in a way that is formatted for the course TDA367/DIT211; this parameter equals -lmrTw. || || -w, --weeks[=BOOL] || || Show all statistical information in weeks instead of in months. || || -x, --exclude=PATTERN || || An exclusion pattern describing file names that should be excluded from the statistics. Works in the same manner as an inverted grep, meaning that any matched file names will be excluded from the generated statistics. Can be specified multiple times. (New since 0.3.0: Support for regular expressions.) || || -h, --help || || Display this help and exit. || || --version || || Output version information and exit. ||
= Supported output formats (new since 0.2.0) = There are support for multiple output formats in gitinspector. They can be selected using the -F/--format flags when running the main gitinspector script. == Text (Plain Text) == Plain text with some very simple ANSI formatting, suitable for console output. This is the format chosen by default by gitinspector. == HTML == HTML with external links. The generated HTML page links to some external resources; such as the JavaScript library JQuery. It requires an active internet connection to properly function. This output format will most likely also link to additional external resources in the future. == HTMLEmbedded (new since 0.3.0) == HTML with no external links. Similar to the HTML output format, but requires no active internet connection. As a consequence; the generated pages are bigger (as certain scripts have to be embedded into the generated output). == XML == XML suitable for machine consumption. If you want to parse the output generated by gitinspector in a script or application of your own; this is the format you should choose.
= Using git config to configure gitinspector (new since 0.3.0) =
Options in gitinspector can be set using git config. Consequently, it is possible to configure gitinspector behavior globally (in all git repositories) or locally (in a specific git repository). It also means that settings will be permanently stored. All the long options that can be given to gitinspector can also be configure via git config (and take the same arguments).
To configure how gitinspector should behave in all git repositories, execute the following git command:
git config --global inspector.option setting
To configure how gitinspector should behave in a specific git repository, execute the following git command (with the current directory standing inside the repository in question):
git config inspector.option setting
= Windows support =
If you want to run gitinspector under Windows, there are a few things to consider. Refer to the following page for more information: