From 4c7dc565e769d9fc0d5c4e9abcd6dfd202f72fa8 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Tue, 30 Dec 2014 20:52:48 -0600 Subject: [PATCH] Update including explicit steps to resolve conflicts. --- CONTRIBUTING.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 697f2b2f..1dde4c27 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,6 +26,14 @@ Great! You'll need to: 0. Add your grammar to [`grammars.yml`][grammars] by running `script/download-grammars --add vendor/grammars/MyGrammar`. 0. Add samples for your language to the [samples directory][samples]. +In addition, if your new language defines an extension that's already lised in [`languages.yml`][languages] (such as `.foo`) then sometimes a few more steps will need to be taken: + +0. Make sure that example `.foo` files are present in the [samples directory][samples] for each language that uses `.foo`. +0. Test the performance of the Bayesian classifier with a relatively large number (1000s) of sample `.foo` files. (ping @arfon or @bkeepers to help with this) to ensure we're not misclassifying files. +0. If the Bayesian classifier does a bad job with the sample `.foo` files then a [heuristic](https://github.com/github/linguist/blob/master/lib/linguist/heuristics.rb) may need to be written to help. + +Remember, the goal here is to try and avoid false positives! + We try only to add languages once they have some usage on GitHub, so please note in-the-wild usage examples in your pull request. In most cases we prefer that languages already be in use in hundreds of repositories before supporting them in Linguist. [grammars]: /grammars.yml