Linguist: 16-bit assembly misclassified as ActionScript

Created on 23 Jun 2017  路  4Comments  路  Source: github/linguist

Relevant code:
https://github.com/RafaelPAndrade/LEIC-A-IST/blob/943992d0ae5948fa9c16edb619ba624c3ecf7b1c/IAC/LAB/3/assembly1/lab.as

What should I do? Use .gitattributes?

I know that the normal assembly code file extension is .asm, but the assembler I use only accepts .as

All 4 comments

You can use an override to tell Linguist how the files are to be classified.

So, in the root of your project, add a .gitattributes file with the following content:

~
*.as linguist-language=Assembly
~

Thanks for the quick reply!

However, I'm am also concerned with the heuristics used.
If you open the file, it is clear that it is not ActionScript, but assembly...
Just my two cents

That's not how Linguist works. It uses a list of file extensions (or filenames) to identify a language, relying on Bayesian classification to distinguish between languages which share extensions. Heuristics are only used if the Bayesian classifier doesn't do a good enough job telling two languages apart.

Sorry to have misunderstood Linguist.
You are absolutely right. I'm going to close this issue. Thanks for the help!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FranklinYu picture FranklinYu  路  4Comments

BnSalahFahmi picture BnSalahFahmi  路  3Comments

lucasrodes picture lucasrodes  路  6Comments

oldmud0 picture oldmud0  路  6Comments

etc0de picture etc0de  路  5Comments