Commit Graph

437 Commits

Author SHA1 Message Date
Adam Waldenberg 1d2fd619bd Fixed a special and unique KeyError exception that could occur.
This is because of a mismatch between the changes module and the
blame module. Seems to be triggered by empty rows in source files.
2014-11-06 10:46:23 +01:00
Adam Waldenberg fa5e5411f5 Fixed problem with the new email detection patch. 2014-11-03 11:02:06 +01:00
Yannick Moy 12dce7f365 Recognize comments in Ada and OCaml.
Signed-off-by: Adam Waldenberg <adam.waldenberg@ejwa.se>
2014-11-03 10:34:46 +01:00
Diomidis Spinellis bc5b0abe74 Remove assumption of Python path.
For example, on a FreeBSD system Python can be installed in
/usr/local/bin/python.

Some systems have multiple interpreters installed in a variety of
locations.  The attached patch corrects the problem by using the
env(1) command to run Python.

Signed-off-by: Adam Waldenberg <adam.waldenberg@ejwa.se>
2014-11-03 10:19:04 +01:00
Diomidis Spinellis b20f15e794 More stable author email extraction.
The email search regular expression in the git-blame output can be tripped
by a similar pattern appearing in the source code. The supplied patch
fixes the problem.

Signed-off-by: Adam Waldenberg <adam.waldenberg@ejwa.se>
2014-11-03 10:12:44 +01:00
Chris Barry d6a2f33de5 Use https where possible.
Signed-off-by: Adam Waldenberg <adam.waldenberg@ejwa.se>
2014-11-03 09:56:49 +01:00
Adam Waldenberg 7b61a46d7c The blame chart legend now shows the correct colors (Fixes issue 26).
To also correctly update the legend of the chart, a call to setupGrid()
(in Flot) seems to be required.
2014-07-04 01:37:58 +02:00
Adam Waldenberg 93b18cdd9a The name of the project is now shown in the title of the HTML output.
Moved the gitinspector version number from the title down to the top text
box of the HTML page.
2014-03-17 08:47:49 +01:00
Adam Waldenberg 722ca9b91a The HTML output of the metrics module now shows violation severity.
This is accomplished by color coding the rows of the violations in the
following manner:

minimal violations: light green
minor violations:   green
medium violations:  yellow
bad violations:     light-red
sever violations:   red

Naturally, the zebra coloring of the rows is still being maintained.
2014-02-26 13:53:11 +01:00
Adam Waldenberg 144303dab6 The metrics module cyclomatic complexity density now limited to 3 decimals. 2014-02-26 11:57:43 +01:00
Adam Waldenberg 6052eb5646 Fixed XML output of the metrics module. Also reworked the indentation. 2014-02-26 11:54:23 +01:00
Adam Waldenberg 232e041861 Did some visual improvements to the HTML output of the metrics module.
Each metrics section now has a header with proper coloring. Furthermore,
every other row of the outputted violations are colorized in order to
improve readability.
2014-02-26 11:43:57 +01:00
Adam Waldenberg efe04cc10b Added cyclomatic complexity output to the HTML and XML output formats.
More of the strings in the metrics module are now also localized.
2014-02-25 06:08:26 +01:00
Adam Waldenberg f85c2fe7b4 Removed height adjustment from the HTML body. This isn't needed anymore. 2014-02-24 14:15:37 +01:00
Adam Waldenberg b2528cfda7 Fixed horizontal centering of the header in the HTML output. 2014-02-24 14:14:02 +01:00
Adam Waldenberg fac4b34646 Fixed invalid function call in the responsibilities module. 2014-02-20 21:03:00 +01:00
Adam Waldenberg 9b2aecc3e9 Added support for cyclomatic complexity to the metrics module.
The calculation is rather simple and is not meant to be a reflection of
McCabes's cyclomatic complexity number. Instead, it is an approximation,
implemented in a more general way and supporting many different languages
through the use of regular expression matching.

The initial languages supported in this metric are: Java, JavaScript, C,
C++ and Python.

If anyone needs support for some other language, patches to the metric
module (metrics.py) are welcome.
2014-02-20 20:57:57 +01:00
Adam Waldenberg 786a44ddbc Fixed a newly introduced bug in the resonsibilities module.
The blame module was being called with too few arguments, causing an
exception.
2014-02-20 04:08:05 +01:00
Adam Waldenberg 4e4d0a2ddb The repository name and report date is now included in the generated text. 2014-02-20 04:06:47 +01:00
Adam Waldenberg 12e08daf72 Moved absolute path detection into the basedir module.
The base name of the returned absolute path is also the name of the
repository from which the statistics were gathered. We will use this in
the generated reports.
2014-02-20 03:49:16 +01:00
Adam Waldenberg 0447da1933 The git log is now read in reverse order.
This makes sure that the most recent email of an author is always used when
generating the gravatar. It also makes sure that the mappings between
author<->email are correct (and recent).
2014-02-19 06:36:06 +01:00
Adam Waldenberg e902f7b82d Fixed possible exception occurring during stability value gathering.
For now, we return 100 % whenever an author is not found to have any
entries in the changes log. This can happen whenever an author uses the
same email but with different author names.

The solution would probably be to consider these commits to belong to the
same person and merge the results.

This will require some additional changes to the code and a redesign in
the way that author names and emails are mapped.
2014-02-19 06:33:17 +01:00
Adam Waldenberg 02e0858985 The two generated pie graphs now use the same colors (Fixes issue 26).
The same author should have the same color in the two graphs, something
that is more consistent and logical.
2014-02-14 17:26:26 +01:00
Adam Waldenberg a1e90d0a9d The age value of the blame output now listens to the --weeks flag.
Consequently, the age value now shows the average age of all the rows
blamed to an author in months (or weeks when --weeks/-w is used).
2014-02-14 05:25:14 +01:00
Adam Waldenberg 16154cd0ba Added age value to the blame output (Fixes issue 10).
This completes the "code stability" functionality.

While code stability is a percentage (zero and up) that reflects the
stability of the authors code, the age value is a pseudo-value describing
the average age of all the authors rows. The older the code, the higher
the value.

Code stability can sometimes be above 100%, depending on the way git
calculates insertions and blamed rows.
2014-01-27 03:11:15 +01:00
Adam Waldenberg 98e3f45d65 Added stability value to the blame output. 2014-01-26 02:49:31 +01:00
Adam Waldenberg d99e8cb58d The help text now talks about repositories instead of directories.
This makes more sense now that gitinspector supports remote repositories
in addition to repositories in the local file system.
2014-01-22 00:46:14 +01:00
Adam Waldenberg d8bdbe9f6f Fixed broken header in optval module. 2014-01-22 00:24:22 +01:00
Adam Waldenberg a45df61aa9 Implemented support for remote repositories (Fixes issue 18).
The supported protocols are file://, git://, http://, https:// and ssh://.

Whenever one of the above prefixes are detected in the repository name,
"git clone" is used to clone the repository into a temporary directory.

When "git clone" is called, it's output is redirected to stderr; meaning
that redirection of stdout to a file functions just as before.

If "git clone" fails for some reason, gitinspector will exit; returning
the error code from the "git clone" command.
2014-01-21 12:14:13 +01:00
Adam Waldenberg 974be06f2b Bumped the version number to 0.3.2. 2014-01-15 13:30:15 +01:00
Adam Waldenberg 2b4e6bb111 A newline was missing in the blame output when redirecting stdout. 2014-01-15 13:26:36 +01:00
Kamila Chyla 49c80184e2 Added Polish translation (Fixes issue 16). 2014-01-15 11:17:16 +01:00
Bill Wang f834fc613e Updated Chinese translation (Fixes issue 11). 2014-01-15 11:11:36 +01:00
Adam Waldenberg 1269df639e Part of the help text in the Italian translation was wider than 80 chars. 2014-01-15 10:09:32 +01:00
Adam Waldenberg 37c295186c The --version flag now outputs the correct years (2012-2014).
This also required a small update to all the (up-to-date) language files.
2014-01-15 10:04:46 +01:00
Adam Waldenberg 3d6789f728 Set the zip_safe flag of setup.py to False (Fixes issue 17).
This hopefully fixes the faulty behavior in egg installations.
2014-01-14 07:18:25 +01:00
Luca Motta 949d73a4b4 Added Italian translation (Fixes issue 20). 2014-01-13 17:40:17 +01:00
Adam Waldenberg 8d9d73549c Updated the locale template (.pot) and the Swedish translation.
As soon as the rest of the languages get updated with the new (and
modified) strings from the .pot file, we should be able to tag a new
release.
2014-01-13 13:42:04 +01:00
Adam Waldenberg f044b9ef9d Updated README.txt to cover 2012-2014. 2014-01-13 12:06:40 +01:00
Adam Waldenberg 23bc5fbbea Print a warning when the terminal encoding is not set (Fixes issue 19).
This fix also sets the stdin encoding to UTF-8 whenever it is not set.
The behavior as the same as the one for stdout.
2014-01-08 06:05:10 +01:00
Adam Waldenberg bc00f9731b Fixed some pylint violations in the filtering module. 2014-01-08 04:17:25 +01:00
Adam Waldenberg af7840be81 Added .cc and .hh to the list of default extensions scanned. 2014-01-08 03:51:02 +01:00
Adam Waldenberg a1d83ead9e Added support for comments in .hh files. 2013-12-05 08:47:20 +01:00
Adam Waldenberg abbeed5356 Added support for comments in .cc files. 2013-12-05 08:42:25 +01:00
Adam Waldenberg 37d78ff992 Updated the help command to show information on author/email filtering. 2013-10-30 03:07:45 +01:00
Adam Waldenberg 1a828136b5 Added support for comments in .scala files. 2013-10-28 02:10:09 +01:00
Adam Waldenberg 998ec7456f Added support for comments in .jspx and .xhtml files. 2013-10-25 19:28:31 +02:00
Adam Waldenberg 791e9e39dd Removed unnecessary print in the blame module.
This print should only be enabled in any "interactive format", such as the
terminal (text) output.
2013-09-17 11:56:48 +02:00
Adam Waldenberg e263982806 Progress text of the blame module was being outputted wrong.
Some regression occurred in a previous commit as the progress text never
was purged out of the output.
2013-09-17 11:53:57 +02:00
Adam Waldenberg cf0f40cc4d There was a mistake in the calculation of comments in the blame module.
Whenever filtering of author or email was enabled, problems could arise
when calculating comments percentage. Did some reshuffling of the logic;
resolving it.
2013-08-13 19:26:14 +02:00