Repository navigation
NetCDF files incorrectly classified as nesC #8072
Unanswered
MO-Helena-Reid
asked this question in
Classification
Replies: 1 comment 2 replies
You'll need more than that. Linguist doesn't know about the NetCDF language so support for the language would need to be added first. If the samples are good enough and unique enough from the other languages using the extension, that'll probably do the trick as the classifier should be able to pick the right language. A heuristic would only be needed if the languages are quite similar. The instructions for adding a language in the CONTRIBUTING.md file should be clear and easy enough for everyone to follow so if NetCDF meets our usage requirements, also detailed in the CONTRIBUTING.md file, feel free to submit a PR to add the language. |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Problem description
Before adding a manual override (the line
*.nc -linguist-detectablein.gitattributes) to the following repository, the.ncfiles indatawere detected as nesC code and displayed as such in GitHub's "Languages" section. After adding that override, the problem went away.URL of the affected repository:
https://github.com/MO-Helena-Reid/isca-analysis/tree/b92be0273597077a2fd6d7e409195a790155b8a6
Last modified on:
2026-07-13
Expected language:
NetCDF, which is a format commonly used in geosciences for storing geospatial data. NetCDF is not designed to be human readable. As these files are for data rather than code, they ought to be ignored altogether by linguist.
Detected language:
nesC, which I was not familiar with but I expect is this one: https://en.wikipedia.org/wiki/NesC
Additional notes
There is an existing discussion and an existing issue discussing
.ncfiles that were incorrectly identified as nesC rather than G-code. This is a separate problem affecting files with the same extension, apparently there are at least three different usages of.ncout there. I'd love to pop in a PR that adds a heuristic that distinguishes between the three, but I'm afraid I'm an Earth scientist with neither the knowledge how nor the time to learn just now. Figured it was polite to mention it all the same.All reactions