Forums : Technical Issue Help

Dear Open Hub Users,

We’re excited to announce that we will be moving the Open Hub Forum to https://community.synopsys.com/s/black-duck-open-hub. Beginning immediately, users can head over, register, get technical help and discuss issue pertinent to the Open Hub. Registered users can also subscribe to Open Hub announcements here.


On May 1, 2020, we will be freezing https://www.openhub.net/forums and users will not be able to create new discussions. If you have any questions and concerns, please email us at [email protected]

Wrongly identifying Pascal as Puppet

Hello,

If you look at the section for the Puppet Programming Language you will see that all of the top commiters in this language are actually developers of the Pascal community which have no idea what Puppet Programming Language is.

It is probably wrongly identifying some of our files as being in this language based on the extension, but I have no idea which files exactly as I haven't found a description of how it maps the extensions to languages.

Please fix this, because in the Lazarus project for example there are zero lines of code in this Puppes language which I had never heard about and it is very confusing to appear as if there is a lot of it.

thanks,

Felipe Monteiro de Carvalho

Felipe Monteiro... over 12 years ago
 

It's the .pp extension probably.

It was originally used by FPC to set apart code that used FPC extensions (to Turbo Pascal then), and goes back to before I became a committed (1998)

It would be great if we could make an exception for the FPC (the various fpc+lazarus projects) to map .pp onto pascal.

It seems that Haskell can also use this extension.

marcovje over 12 years ago
 

Bumping this post in hopes that someone from Blackduck will notice and respond. It seems to be a problem both ways -- Pascal code is being counted as Puppet, and Puppet code is being counted as Pascal. (I'm in the latter group.)

wcooley almost 10 years ago
 

Wil,

Of course, we will look into it but if you could, I encourage you to check out our source code recognition engine at https://github.com/blackducksw/ohcount

Since you are the expert on how to unthread the needle between Puppet code and Pascal, you would be the logical person to see what we've done wrong and suggest (or hopefully patch) our issues in this area. This will make it much quicker to get the fix you so obviously want.

I will pass on the strong request to management and have them check in here.

Thanks!

ssnow-blackduck almost 10 years ago
 

Hi Folks;

Steve has the heart of the issue correctly. The problem lies in Ohcount and the best solution is when someone submits a PR for Ohcount that differentiates between the different languages that use the .pp extension.

There are a few open PR's for Ohcount that are next up on our backlog after we release the new Organization pages. Please help us out and submit a PR for Ohcount!

Thanks!

Peter Degen-Por... almost 10 years ago
 

Oh, great -- I'll take a look through the Github project; I looked on the margins of the site but did not find any obvious support or help links other than this forum.

wcooley almost 10 years ago
 

I've submitted a pull request, which expands the regex ohcount uses to disambiguate .pp files; Puppet parameterized classes were not being matched:

https://github.com/blackducksw/ohcount/pull/39

Unfortunately this does nothing for the guys with Pascal being detected as Puppet. It also misses some smoke-test files, but fortunately these are usually only a few lines (often only 1); they could be ignored entirely without a significant loss.

I was guessing that contextual heuristics were in use, like other files or directories in the repository -- If one could default to Puppet when the file has a parent directory named manifests or there is a manifests directory at the top-level (to catch manifests in tests/, used sometimes for smoke-tests), that would probably handle nearly all the cases I know of. But aside from src/hash/filenames.gperf, I do not see anything approaching that.

wcooley almost 10 years ago