adamtornhill / code-maat

A command line tool to mine and analyze data from version-control systems

Home Page:http://www.adamtornhill.com/code/codemaat.htm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid argument/parse error with dates in Git commit messages

fschmied opened this issue · comments

The following git log file leads to an error when invoking Code Maat (winmaat0.8.5) using maat -l evo.Sample.log -c git -a summary:

[611a2fe] User2 2016-03-11 (JIRA-789) Some text (see mails of 2016-03-11).
12  3   Project.UnitTests/Spec.cs
3   3   OtherProject.UnitTests/OtherSpec.cs

The error message is:

Invalid argument:  input: [611a2fe] User2 2016-03-11 (JIRA-789) Some text (see mails of 2016-03-11).
12      3       Project.UnitTests/Spec.cs
3       3       OtherProject.UnitTests/OtherSpec.cs
, reason: Parse error at line 1, column 73:
[611a2fe] User2 2016-03-11 (JIRA-789) Some text (see mails of 2016-03-11).
                                                                        ^
Expected:
#"\s"

This is Code Maat, a program used to collect statistics from a VCS.
[...]

Code Maat seems to interpret the date within the message as something to be parsed rather than treating it as an opaque part of the commit message.

Thanks for spotting this! I don't know when I'll get around to fix the parser. Fortunately, there's a second log format that don't suffer this problem. Check the documentation of Code Maat's -c git2 parse option. Please note that it requires a different input log format.

Solved by fixing a bug in the negative look-ahead used in the git parser.