0

I use GitHub for a C++ / Qt project. GitHub automatically determines the languages of the project from the file extentions. Problem: Qt has a file name ProjectName.pro, which is interpreted to be Prolog by GitHub.

How can I indicate it is NOT Prolog, but C++ ?

Hooked
  • 84,485
  • 43
  • 192
  • 261
  • 1
    What is the content of this file? GitHub has a tendancy of misjudgning file type, especially small files. – olevegard Sep 01 '13 at 20:25
  • The .pro file of a Qt project only contains the included library and the name of the source and headers files. It's very small, only 11 lines. –  Sep 01 '13 at 20:27
  • Is the entire repo considered Prolog? – Fred Foo Sep 01 '13 at 22:13
  • 2
    Heh, now I know why Github thinks I have prolog experience. – Frank Osterfeld Sep 02 '13 at 14:16
  • @larsmans No, but 3% of it is. And on my profile it's written I code with C++ and Prolog, which is wrong, I only code in C++, not in Prolog at all. –  Sep 02 '13 at 19:59

2 Answers2

2

It is actually a known issue: https://github.com/github/linguist/issues/394

It's been submitted 6 month ago but GitHub still doesn't bother fixing it... Do you think of any workaround ?

1

As said in the original issue (https://github.com/github/linguist/issues/394):

Linguist now supports custom overrides for language definitions and custom vendor paths

So in order to finally have Qt project files properly recognized as C++ in language statistics, you can add this line in your .gitattributes file.

*.pro linguist-language=C++

See https://github.com/github/linguist#overrides for more details.

N. Faure
  • 412
  • 7
  • 14