List of patterns that Ohcount matches?

Avatar

IBBoard

3 months ago

I've just updated my code to the Affero GPL, but didn't use the full standard header (it's a bit of a waste of space to write out the whole lot when all you need is "this file is licensed under licence ..., see COPYING for full license"), but Ohloh is picking it up as GPL (https://www.ohloh.net/p/WarFoundry/analyses/latest).

The first question is, is it possible to get a list of the patterns that Ohcount looks for with each license?

The second question is, is it possible to change Ohcount so that it looks for "Affero GPL" as the Affero GPL rather than the standard GPL? I used it because AGPL isn't well known and I didn't want to have it written in full.

Thanks.


Avatar

Robin Luckey

3 months ago

HI IBBoard,

We don't have a simple list, but the source code to the license parser is available.

The source code parser Ohcount is a SourceForge project.

The file that contains the license lookup table is src/licenses.c.

From looking at the code, it seems that our Affero detection is not very forgiving. We do not accept "AGPL" or "Affero GPL" as valid declarations.

This should be relatively easy to add. I've opened a bug ticket for the change, but I can't make any promises about a timetable.

Thanks, Robin


Avatar

IBBoard

3 months ago

Thanks for adding that bug ticket/feature request. The Affero GPL is at least close to the GPL, so it isn't a major mis-representation :) I am looking forward to the day when we're able to drill-down in to the stats (to see what files are under which licenses and which files are classed as which file types)

The code is fairly readable for anyone who understands regexes, so it's not too difficult to decypher.


Avatar

Robin Luckey

3 months ago

Hi IBBoard,

I am also looking forward to that day :-).

We've wanted to offer web UI to drill into parser results since day one, but other problems have always had higher priority. We'll get there, eventually...


Avatar

IBBoard

2 months ago

...Never mind - mis-reading of site!...


Avatar

IBBoard

2 months ago

...Never mind - mis-reading of site!...