smontanari / code-forensics

A toolset for code analysis and report visualisation
384 stars 45 forks source link

umlaut in contributor name #17

Closed jdevoo closed 6 years ago

jdevoo commented 6 years ago

Could it be that the gulp task for developer-coupling-analysis does not play well with a name such as "Thomas Müller"?

I could not manage to group it inside its contributors array...

    contributors: {
        'Team N: [['Andrei Rebegea'], ['Andreea Nechifor'], ['Andrei Forascu'], ['Ancuta Morarasu'], ['Mihaela Popa'], ['Alex Mukha'], ['Alexandru-Eusebiu Epure'], ['CodrinChirica']],
        'Team A': [['Matt Ward'], ['Alan Davis', 'alandavis'], ['Erik Knizat', 'eknizat'], ['Martin Müller], ['ahind'], ['Cristian Turlica']]
    }

Rendering below dev-coupling-alfresco-repo

smontanari commented 6 years ago

If you're referring to 'Martin Müller' as shown in the diagram it looks like you forgot a single quote in your configuration file.

More generally speaking there's no special logic around character encoding. All files should be written/read using utf-8, therefore taking into account all usual character sets (however I'm not sure that is true for Windows). An easy way to check if you've missed/misspelled a contributor name is to look for such name into the generated vcs log files in the temporary folder.

jdevoo commented 6 years ago

I had fixed the quote thing but indeed editing the gulpfile on Windows and looking at it on the Docker image shows a problem with the character translation. Will look at settings in Sublime...

jdevoo commented 6 years ago

re-opened; encoding seems fine on the file when I cat it from within the Docker image...

smontanari commented 6 years ago

I can't reproduce the problem. I tested with log files containing names with umlaut and it all seems to be working fine. Are you analysing a public repo? If so I can try the very same one

jdevoo commented 6 years ago

It's from the alfresco-repository

smontanari commented 6 years ago

You likely have a problem in the way the umlaut character is encoded in your gulpfile (maybe caused by copy & paste). One way to get it right is to explicitly write the umlaut character as a separate unicode entity next to the "u" character, e.g. u\u0308

Following the example of your configuration, this is what I used, successfully, to define the contributor (the second name is an alias present in several log commits): ["Martin Mu\u0308ller", 'Martin Muller']

jdevoo commented 6 years ago

Thank you Silvio!