small medium large xlarge

Generic-user-small
18 May 2015, 10:01
garfield moore (2 posts)

I am experiencing difficulty with Code-Maat. I’ve compiled the latest source and downloaded V0.8.5 from the website.

I’ve been following the examples in the book. For example, using the below git command;

 git log --pretty=format:'[%h] %aN %ad %s' --date=short --numstat --before=2013-11-01

and then starting code-maat

maat -l logfile.log -c git -a summary

I get the following error


, reason: Parse error at line 1, column 1:
??[ d 8 0 4 7 5 9 ]   A d a m   P e t e r s e n   2 0 1 3 - 0 9 - 2 4   D o c u m e n t e d   t r e e   m a p   v i s u
a l i z a t i o n s
^
Expected:
[

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

Can anyone shed any light on what I’m doing wrong?

Generic-user-small
18 May 2015, 10:23
garfield moore (2 posts)

I’ve since realised the issue is the format of the file.

Although, I was specifying the encoding in git it was creating the file as UTF-16.

If I open the output in a text editor and save it as UTF-8 code maat works fine.

So, looks like this is my lack of knowledge of git and encoding.

Adamtornhill copy_pragsmall
18 May 2015, 19:15
Adam Tornhill (14 posts)

Thanks for sharing the solution!

I’ve seen it happen a few times when Git is used in combination with PowerShell on Windows; PowerShell defaults to UTF-16 encoding while Code Maat uses UTF-8 as its default.

In addition to the workaround provided above, Code Maat also supports an input-encoding argument. It accepts all encodings that are supported by the underlaying Java platform (see here for a list of encodings).

You must be logged in to comment