Skip to content

Python project setup being misclassified as HaProxy when it should be INI #6489

Discussion options

You must be logged in to vote

Almost all of these are going to be because of the .cfg extension matching both HAProxy and INI and Linguist falling through to the classifier as there isn't a heuristic for the .cfg extension. The classifier is trained on the samples provided in Linguist and in the case of the .cfg extension, there are 4 samples for HAProxy and only tiny, and pretty poor 5 year old sample for INI.

There are a few things that can be done to improve this:

  1. Add a heuristic (it's a regex) for .cfg files to differentiate between HAProxy and INI
  2. Add more INI representative .cfg samples to better train the classifier

I'm loath to add setup.cfg as a filename for INI as it's a very generic filename so will resul…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lildude
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants