Commit Graph

26 Commits

Author SHA1 Message Date
Adam Waldenberg a56680c4b4 Handle git-rev-list and git-ls-tree with empty changesets (#132, #115).
If the changeset was empty or filtered with no matching files a bunch of
errors would be thrown from git with no proper results being returned
back to gitinspector.

We now pipe stderr (catching the output) and also check the return code
when running these commands.
2017-05-13 15:41:13 +02:00
Adam Waldenberg ecc67a31a5 Repositories are now merged with __iadd__() instead of __add__().
Thus, we are overriding the "+=" operator instead of "+". This
implementation results in a much cleaner solution as we were directly
updating "self" when overriding __add__(), something which isn't really
an acceptable solution as we were changing the supplied in-parameters.
2015-11-25 17:28:50 +01:00
Adam Waldenberg 802f18e7e5 The metrics module now supports multiple repositories (See issue #24). 2015-11-01 03:36:40 +01:00
Adam Waldenberg 124636cb85 Restructured imports slightly. 2015-10-21 05:26:20 +02:00
Marc Harper 4f3e0d3073 Restore relative imports of changes and filtering 2015-10-20 09:48:32 -07:00
Marc Harper 9abb9b3d56 Relative imports to fix packaging issues 2015-10-20 09:40:08 -07:00
Adam Waldenberg 1f2f120389 Fixed pylint violations reported by a newer version of pylint. 2015-10-12 03:15:30 +02:00
Adam Waldenberg 34337dec17 Refactored all outputable modules.
This prepares the source code for the changes discussed in issue #24.

Note that this is just a quick restructuring in order to see the resulting
classes and separation. More work will be done to make it more elegant
and with less dependencies between modules.
2015-10-12 03:03:07 +02:00
Adam Waldenberg a6c05cc619 Added support for comments and metrics in C# code (Fixes #59). 2015-09-24 04:11:38 +02:00
Adam Waldenberg b48c65efb1 All subprocess.Popen calls now use the list variant.
Most (all?) hard coded quotations have been removed in favor of automation
and the pipes or shlex modules.
2015-09-07 01:53:24 +02:00
Adam Waldenberg bc6be1c56f Fixed some pylint violations. 2014-11-27 12:38:58 +01:00
Adam Waldenberg dd50994f2c The metrics module was failing on paths with spaces (Fixes issue 47). 2014-11-21 02:55:29 +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 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 bc182c6924 Completely removed the missing module and the --checkout-missing option.
This is flag should not be needed anymore, as gitinspector always uses
a reference point such as HEAD or some reivision when looking into the
repository (never the file structure directly).
2013-08-03 10:30:43 +02:00
Adam Waldenberg 9e39bf8ed2 Added the new localization strings to the pot file.
In the process, the new strings were also translated to Swedish. To
properly handle localized string constants, a new function "N_()" was
added which can be supplied to xgettext when collecting strings.
2013-07-10 13:55:23 +02:00
Adam Waldenberg 3b82acdfa1 Added a --localize-output flag.
The default behaviour is now not to localize the output, only the help
text and error messages (all the user interaction).

The way localized messages are fetched in the modules has been modified
as well; to allow for the ability to enable and disable the localization.
2013-07-10 05:24:18 +02:00
Adam Waldenberg 942836cc1c There was a mixup in the metrics module (wrong ordering of return values). 2013-07-04 10:07:41 +02:00
Adam Waldenberg bb72cc8f02 Added a handle_comment_block() function in the comment module.
This function moves most of the logic of handling comments into the
comment module itself, thus avoiding duplicated code and allowing for
a cleaner solution.
2013-07-02 23:03:09 +02:00
Adam Waldenberg 9c0633f8ad Added gettext (GNU) localization support. 2013-06-25 14:38:40 +02:00
Adam Waldenberg 8a386225fd Added "ignore" parameter to unicode_escape decodings (Fixes issue 4). 2013-06-17 07:47:47 +02:00
Adam Waldenberg f36b82170f File structure rearranged to be more compatible with setuptools/Distribute.
The fact is, gitinspector is now stable enough to inlude support for python
distribution and setup. This is the first step towards that transition.
2013-06-14 03:16:30 +02:00