github-linguist / linguist

Language Savant. If your repository's language is being reported incorrectly, send us a pull request!
MIT License
12.29k stars 4.26k forks source link

Pawn files mismatched as SourcePawn files #2823

Closed shrmnk closed 5 years ago

shrmnk commented 8 years ago

I have recently added some of my old plugins I wrote for AMX Mod X (scripting framework used for Half-Life 1/goldsrc engine-based games). The languages these are written in is Pawn, which was later adapted by SourceMod for the Source engine, to make SourcePawn.

Historically, we released the source code for our plugins in files ending with the .sma extension. "sma" is short for "small", which was the original name of the language before "Pawn". Therefore, we sometimes label our language as "Pawn/Small" - the current definition in the linguist language file is "PAWN".

The 2 documented guides for writing Pawn also includes .pawn and .p as possible file extensions for Pawn files. Therefore,

Recommended file extensions

(I've manually overridden the language through .gitattributes)

pchaigno commented 8 years ago

.sma is already recognized as SourcePawn. There are only 102 .pawn files so that will probably not be enough to add it to Linguist. .p is already an OpenEdge ABL extension. To add .p to Pawn, you'll have to show that there are a good number of repositories using them. We'll also have to check the detection accuracy. Please see the contribution guidelines on how to add a new extension.

Crayder commented 8 years ago

Just gonna note, there are "7,445 code results" for .pwn which is a PAWN file. .pwn is the general extension used for Pawn in SA-MP. We use .pwn for the main scripts and .inc for the includes. The y_testing include in your SourcePawn samples is a SA-MP designated include.

pchaigno commented 8 years ago

@Crayder .pwn files are already recognized as PAWN files, it is not working for you?

Crayder commented 8 years ago

I wasn't saying that was the problem, I was just pointing that out.

pchaigno commented 8 years ago

Oki :-)

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had activity in a long time. If this issue is still relevant and should remain open, please reply with a short explanation (e.g. "I have checked the code and this issue is still relevant because ___."). Thank you for your contributions.

stale[bot] commented 5 years ago

This issue has been automatically closed because it has not had activity in a long time. Please feel free to reopen it or create a new issue.