Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

master and readme-edits. #14

Open
wants to merge 2,533 commits into
base: test/attributes
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2533 commits
Select commit Hold shift + click to select a range
2610808
Updating licenses
arfon Mar 18, 2016
b5091e8
Updating licensor -> licensed
arfon Mar 18, 2016
fc9fad1
Updating license information for dependencies
arfon Mar 18, 2016
bfd4005
Disable license caching for rubygems and npm
bkeepers Mar 18, 2016
0c38df4
Save config
bkeepers Mar 18, 2016
b3c4232
Removing old license
arfon Mar 18, 2016
0a4c850
Merge branch 'licensor-mk2' of github.com:github/linguist into licens…
arfon Mar 18, 2016
868e528
Downcase
arfon Mar 18, 2016
b44dfb4
Removing Clips grammar
arfon Mar 18, 2016
46b0b1e
Removing Creole grammar
arfon Mar 18, 2016
0ae8b29
Removing Logos grammar
arfon Mar 18, 2016
f6e1ab4
Removing ATS grammar
arfon Mar 18, 2016
9c18bf3
Removing AutoIt grammar
arfon Mar 18, 2016
f83f761
Removing Boo grammar
arfon Mar 18, 2016
53e3407
Removing Grace grammar
arfon Mar 18, 2016
abe3aa4
Removing GDScript grammar
arfon Mar 18, 2016
835ceae
Removing x86 grammar
arfon Mar 18, 2016
10eb583
Removing Monkey grammar
arfon Mar 18, 2016
60ab4a5
Removing SourcePawn grammar
arfon Mar 18, 2016
ca6ac8f
Removing nesC grammar
arfon Mar 18, 2016
eec3248
Removing Idris grammar
arfon Mar 18, 2016
a9b3bd6
Removing puppet grammar
arfon Mar 18, 2016
07096f8
Removing nix grammar
arfon Mar 18, 2016
ee1bd50
Removing oracle grammar
arfon Mar 18, 2016
74d704b
Removing pig latin grammar
arfon Mar 18, 2016
93fabe4
Removing openscad grammar
arfon Mar 18, 2016
92904ef
Fixing Ruby warning
arfon Mar 18, 2016
162b77a
Removing unused grammar
arfon Mar 18, 2016
f6a7b49
Updating Papyrus grammar
arfon Mar 18, 2016
b5121e5
Updating papyrus scopes
arfon Mar 18, 2016
799c47c
Grammar update
arfon Mar 18, 2016
d46e214
Removing InnoSetup grammar
arfon Mar 18, 2016
b72c4d4
Fix Ruby deprecation warning
arfon Mar 18, 2016
5b9ea4a
Updating grammar checks to ensure license compliance
arfon Mar 18, 2016
065c809
Updating grammars based on script/licensed
arfon Mar 18, 2016
b9501e4
Merge pull request #2884 from github/licensor-mk2
arfon Mar 18, 2016
6ff9503
Adding replacement grammar for Puppet
arfon Mar 18, 2016
1aea6b2
Merge pull request #2886 from github/puppet-highlight
arfon Mar 18, 2016
9520cbb
Bringing back Assembly highlighting
arfon Mar 19, 2016
1a11664
Adding sublimeassembly to license whitelist.
arfon Mar 19, 2016
4a2cb32
Merge pull request #2887 from github/assembly-highlight
arfon Mar 19, 2016
00764f3
MIT license in package.json
pchaigno Mar 19, 2016
67191d4
Bringing Monkey grammar back under MIT license
arfon Mar 19, 2016
27590c3
Merge pull request #2892 from github/bringing-monkey-back
arfon Mar 19, 2016
de074f4
Merge pull request #2891 from pchaigno/package-license
arfon Mar 19, 2016
0fe8544
Merge pull request #2893 from github/extra-assembly
arfon Mar 19, 2016
b227061
Merge pull request #2896 from github/bring-back-logos
arfon Mar 20, 2016
3f04c11
Merge pull request #2895 from github/bring-back-boo
arfon Mar 20, 2016
79a61c7
Restoring curated grammars
arfon Mar 20, 2016
b1f5e93
Merge pull request #2897 from github/pig-latin
arfon Mar 20, 2016
270fa8f
Merge pull request #2894 from pchaigno/fix-warnings
pchaigno Mar 20, 2016
16a6d68
Adding Rubygems licenses.
arfon Mar 20, 2016
c6625b1
Merge pull request #2898 from github/sourcepawn
arfon Mar 20, 2016
ca718d8
Fixing up script/licensed verify
arfon Mar 20, 2016
b881e3e
Merge pull request #2900 from github/gdscript
arfon Mar 21, 2016
8a27884
Merge pull request #2899 from jamesqo/patch-1
jamesqo Mar 21, 2016
71cdf46
Merge pull request #2903 from github/nesC
arfon Mar 21, 2016
d991430
Merge pull request #2905 from github/ats
arfon Mar 21, 2016
57a3c14
Merge pull request #2906 from jamesqo/patch-3
jamesqo Mar 22, 2016
84471a5
Merge pull request #2908 from github/grace
arfon Mar 23, 2016
2012647
Merge pull request #2907 from keplersj/clang-format
keplersj Mar 24, 2016
c7868a9
Merge pull request #2902 from jamesqo/patch-2
jamesqo Mar 24, 2016
3928734
Updating grammars
arfon Mar 25, 2016
aa6b881
Bumping to v4.8.1
arfon Mar 25, 2016
7501b82
Updating licenses
arfon Mar 25, 2016
e6ab516
Merge pull request #2911 from github/cut-release-v4.8.1
arfon Mar 25, 2016
4867db8
Adding back nix grammar
arfon Mar 28, 2016
bd0f4f6
Merge pull request #2914 from github/adding-back-nix
arfon Mar 28, 2016
ce37cd6
Fix protocol of Nix submodule's URL
Alhadis Mar 29, 2016
7c8bc85
Merge pull request #2921 from Alhadis/protocol-fix
arfon Mar 29, 2016
24b368a
Add ".es" to recognised ECMAScript extensions
Alhadis Mar 29, 2016
21d7f99
Cut release v4.8.2
arfon Mar 29, 2016
99ad236
Add ISC to license whitelist
Alhadis Mar 31, 2016
5723710
Adding back Idris grammar
arfon Apr 3, 2016
5a3758f
Linguist license docs bump
arfon Apr 3, 2016
5e3e813
Adds proper grammar for the DM language.
PJB3005 Apr 3, 2016
a917057
Adding atomic dreams license
arfon Apr 3, 2016
0e147f1
Merge branch 'master' into idris
arfon Apr 3, 2016
f28cdc8
Merge pull request #2936 from github/idris
arfon Apr 3, 2016
f8c5015
Switch grammar used for APL highlighting (#2937)
Alhadis Apr 8, 2016
b89d1a2
Add "mkfile" as a recognised Makefile name (#2938)
Alhadis Apr 9, 2016
7c9fd59
Updating licensed information for APL
arfon Apr 14, 2016
bce676e
Add support for GraphQL (#2947)
gjtorikian Apr 14, 2016
5c7aa54
Adding license text for graphql
arfon Apr 14, 2016
04d3023
Grammar update
arfon Apr 15, 2016
0f3644d
Bumping Linguist to v4.8.3 (#2950)
arfon Apr 15, 2016
9b9a256
Added GLSL extensions .vsh & .fsh (#2951)
BruceKnowsHow Apr 15, 2016
1ad2123
Add gradlew and a few other filenames to Shell (#2910)
Dominator008 Apr 15, 2016
c3145d3
Add Forge Mod Loader Mod Info file as JSON (#2941)
keplersj Apr 15, 2016
91aa843
Verify licenses with travis
bkeepers Apr 16, 2016
9289704
Remove licenses from Rubygems licenses
bkeepers Apr 16, 2016
12228fb
Proper exit status for script/licensed
bkeepers Apr 16, 2016
03ef4f3
Remove licenses from removed grammars
bkeepers Apr 16, 2016
8ea9632
Merge pull request #2955 from github/verify-licenses
bkeepers Apr 16, 2016
9a0ac4a
Makefile.frag as a Makefile filename (#2969)
pchaigno Apr 26, 2016
5c655e3
Grammar for AutoIt from Sublime Text package (#2961)
pchaigno Apr 27, 2016
d342aa4
Classify builds, pkgproj, resx and sfproj as XML (#2954)
Apr 27, 2016
f97d796
Add new step required when adding a grammar (#2966)
pchaigno Apr 29, 2016
f3655e8
Add .app.src as Erlang extension. (#2964)
Apr 29, 2016
59f64c4
grammar update
arfon Apr 29, 2016
7174130
Bumping to v4.8.4 (#2973)
arfon Apr 29, 2016
03d1683
Remove Terra from Lua group (#2976)
pchaigno May 3, 2016
8cf3b7a
Heuristic for .inc PHP files (#2980)
pchaigno May 4, 2016
9ae19a1
Add support for World of Warcraft .toc files
Alhadis May 4, 2016
5c19f1f
Limit scope of modeline search (#2967)
pchaigno May 5, 2016
aa049b4
Add support for BSDmakefile, .arcconfig, and .JSON-tmLanguage files (…
Alhadis May 6, 2016
176a0e9
TLA revisited (#2990)
arfon May 6, 2016
5466fcf
Add support for OpenRC runscripts (#2935)
jirutka May 6, 2016
8eae4e5
Add support for Alpine Abuild (APKBUILD) (#2934)
jirutka May 6, 2016
905d87a
Detect .js files with source maps as generated (#2984)
jkrems May 6, 2016
91ea482
Add grammar for CLIPS back (#2991)
pchaigno May 6, 2016
3191ff4
2945 local (#2992)
arfon May 6, 2016
f22181f
EJS support (#2993)
arfon May 6, 2016
aa2319a
Cut release v4.8.5 (#2994)
arfon May 6, 2016
a464c23
Update languages.yml (#2995)
arfon May 7, 2016
1a04c79
Add ECR (Embedded Crystal) (#2996)
keplersj May 9, 2016
b38f4b7
Update languages.yml (#2998)
arfon May 9, 2016
c2505e8
Update CONTRIBUTING.md
arfon May 10, 2016
5155ad8
Adding back Creole grammar (#2999)
arfon May 10, 2016
1968f81
Remove .lock from JSON extentions
snh May 11, 2016
6c07476
Fix incorrect docs on vendored files & restore docs on generated files
russell-stripe May 18, 2016
95e8331
Add "README.1ST" to recognised text-file names (#3010)
Alhadis May 22, 2016
8b0b14c
Add support for the COLLADA file format (#3009)
Alhadis May 23, 2016
255db77
Add support for Wavefront OBJ/MTL files
Alhadis May 27, 2016
8bd8f09
Add sample OBJ/MTL files
Alhadis May 27, 2016
28af996
allow `.pug` to be threated as jade (#3019)
May 29, 2016
e70f3f5
Add Csound languages (#3005)
nwhetsell May 29, 2016
0614055
Merge remote-tracking branch 'upstream/master' into wavefront
Alhadis May 29, 2016
4eb33fe
Use a dedicated grammar for highlighting Nu syntax (#3030)
Alhadis Jun 1, 2016
8972186
Add interpreters for APL and J (#3029)
Alhadis Jun 1, 2016
27e0c8f
Fix a misspelt Cpp-ObjDump alias (#3028)
Alhadis Jun 1, 2016
1e50280
Removing old Elm grammar
arfon Jun 2, 2016
25b761b
Moving to Elm community grammar
arfon Jun 2, 2016
3bc540a
Removing un-used grammar reference
arfon Jun 2, 2016
b4ff170
Merge pull request #3033 from github/change-elm-grammar
arfon Jun 2, 2016
b58c0e8
Merge branch 'master' into 3020-local
arfon Jun 2, 2016
090f765
Merge pull request #3001 from snh/lock-not-json
arfon Jun 2, 2016
8845cd9
Merge pull request #3034 from github/3020-local
arfon Jun 2, 2016
2c3069d
Grammar updates
arfon Jun 2, 2016
f4af472
Bumping to v4.8.6
arfon Jun 2, 2016
ff99d1b
Removing grammar that is breaking the build.
arfon Jun 3, 2016
a015138
Merge pull request #3035 from github/cut-release-v4.8.6
arfon Jun 3, 2016
d356ea2
Add syntax highlighting for the Clean language
Alhadis Jun 3, 2016
1e134b5
Merge pull request #3037 from Alhadis/clean-grammar
arfon Jun 3, 2016
392ab29
Remove existing reStructuredText grammar
Alhadis Jun 4, 2016
2305f90
Add new grammar
Alhadis Jun 4, 2016
caaad88
Kick Travis
Alhadis Jun 5, 2016
cfd5cba
Remove "orphaned" grammar module
Alhadis Jun 5, 2016
0519067
Merge pull request #3038 from Alhadis/rst-switch
arfon Jun 5, 2016
cbbc05f
Merge pull request #3007 from russelldavis/russell-fix-docs
arfon Jun 7, 2016
baf5666
Improve Turing sample (#3040)
MathBunny Jun 7, 2016
c471990
Add npm-shrinkwrap.json to generated files (#3048)
Jun 13, 2016
f285734
Set encoding when writing out samples (#3046)
arfon Jun 13, 2016
920f825
Add heuristic for Perl6 and Turing (#3049)
Alhadis Jun 13, 2016
c4ab3b2
Add syntax highlighting for Turing (#3052)
Alhadis Jun 14, 2016
0669a83
Define TextMate grammar scope for Turing (#3053)
Alhadis Jun 15, 2016
53a532d
Add .srt to Emacs Lisp extensions
Alhadis Jun 15, 2016
1bc87aa
Define SubRip Text language and add sample
Alhadis Jun 15, 2016
ebce489
Add grammar to supply syntax highlighting for SubRip files
Alhadis Jun 15, 2016
d0370a3
Add a heuristic to disambiguate SubRip text files
Alhadis Jun 15, 2016
e77530b
Classify SRecode Templates as a separate language
Alhadis Jun 16, 2016
02fe28e
Crank luminosity of SRecode Template language's colour
Alhadis Jun 16, 2016
96bd08e
Adding some words about maintainers (#3051)
arfon Jun 18, 2016
a9f366a
Merge pull request #3054 from Alhadis/srt
larsbrinkhoff Jun 20, 2016
e4c6c1d
Remove pragma keyword from PLSQL heuristic rule (#3066)
pchaigno Jun 21, 2016
56a65d0
Add ace-builds to vendored files (#3061)
sahildua2305 Jun 21, 2016
6d9b539
Add colour for Roff source
Alhadis Jun 21, 2016
0b6f17c
Add colour for PostScript
Alhadis Jun 21, 2016
62192e1
Revert "Add colour for PostScript"
Alhadis Jun 21, 2016
2e521a6
Grammars update
arfon Jun 21, 2016
16eaa53
Updating gitsubmodules
arfon Jun 21, 2016
81f9079
Bumping version to v4.8.7
arfon Jun 21, 2016
e78e9e4
Merge pull request #3071 from github/cut-release-4.8.7
arfon Jun 21, 2016
5c705b3
Merge pull request #3069 from Alhadis/document-colours
pchaigno Jun 22, 2016
5ac2cdd
Add fontello CSS files to vendor.yml (#3068)
sahildua2305 Jun 22, 2016
a027904
Add another .ino sample for more precision
liavt Jun 25, 2016
144a85b
Rename it to have .ino
liavt Jun 25, 2016
49cdc4a
Merge pull request #3076 from liavt/patch-1
arfon Jun 25, 2016
aa32a5f
Replace samples for C language
sahildua2305 Jun 25, 2016
8551656
Add another sample file for C
sahildua2305 Jun 25, 2016
ead0593
Interpreters for Scheme
pchaigno Jun 26, 2016
7165611
Merge pull request #3080 from pchaigno/scheme-interpreters
arfon Jun 27, 2016
39cd635
Replace sample without license
sahildua2305 Jun 27, 2016
4514363
.pascal file extension for Pascal
pchaigno Jun 27, 2016
776a6a0
Merge pull request #3082 from pchaigno/pascal
arfon Jun 27, 2016
a5eb6e9
Merge pull request #3078 from sahildua2305/remove-gpl-samples
arfon Jun 27, 2016
265d576
Replace GPL licensed C/C++ samples
sahildua2305 Jun 27, 2016
ead6316
Remove another GPL licensed C sample
sahildua2305 Jun 27, 2016
94928bc
Added MIT licensed .cp sample
sahildua2305 Jun 27, 2016
b889225
Remove deleted file name from tests
sahildua2305 Jun 27, 2016
482aa15
Replace GPL licensed gml samples
sahildua2305 Jun 27, 2016
77a4883
Support the EQ programming language (#3086)
pchaigno Jun 28, 2016
5066f66
New interpreters from RosettaCode (#3087)
pchaigno Jun 28, 2016
03c674a
Change language-babel to release v.2.24.4
cozos Jun 28, 2016
0189223
Change language-babel to v2.22.0
cozos Jun 30, 2016
4361ccd
Updating tests corresponding to changes in samples
sahildua2305 Jun 30, 2016
16bd70d
Improve .ts heuristic rule
pchaigno Jul 1, 2016
68728bc
Add .cats sample file
sahildua2305 Jul 1, 2016
6333f39
Merge pull request #3088 from sahildua2305/replace-gml-gpl
arfon Jul 2, 2016
228c269
Merge pull request #3098 from pchaigno/improve-ts-heuristic
arfon Jul 2, 2016
cba9b95
Merge pull request #3085 from sahildua2305/remove-gpl-samples
arfon Jul 3, 2016
1c7f516
Replace .hats GPL sample with MIT one
sahildua2305 Jul 5, 2016
7624eb4
Replace .dats and .sats samples with MIT alternatives
sahildua2305 Jul 5, 2016
59b3e48
Copy license text to samples
sahildua2305 Jul 5, 2016
10be4be
Added Laravel Blade
jbrooksuk Jul 7, 2016
badcb87
Merge pull request #3102 from sahildua2305/remove-gpl-samples
arfon Jul 10, 2016
a1b236d
Update samples
jbrooksuk Jul 11, 2016
0019f60
Fix tm_scope
jbrooksuk Jul 11, 2016
b96ed4b
Switch Lean to text mode
jbrooksuk Jul 11, 2016
abbc132
Set Blade license to MIT
jbrooksuk Jul 11, 2016
c148ecf
Remove Lean grammar; deleted in upstream.
larsbrinkhoff Jul 11, 2016
6493b48
Merge pull request #3108 from larsbrinkhoff/lean
larsbrinkhoff Jul 11, 2016
17168d5
Add "GCC Machine Description" language.
larsbrinkhoff Jun 30, 2016
f56c31b
Merge pull request #3091 from cozos/master
arfon Jul 12, 2016
6c20525
Add support for Apollo Guidance Computer extension
chrislgarry Jul 12, 2016
80a3ea0
Update language name
chrislgarry Jul 12, 2016
329c9a7
Rename sample dir
chrislgarry Jul 12, 2016
05205dd
Alphabetize entries
chrislgarry Jul 12, 2016
2fab404
Add language color
chrislgarry Jul 12, 2016
9fae240
Add license, language grammers for agc
chrislgarry Jul 13, 2016
284486a
Achromaticalizise Markdown.
larsbrinkhoff Jul 13, 2016
01b14de
Remove colors: GraphQL, RDoc, reStructuredText, and
larsbrinkhoff Jul 13, 2016
1f1ca3e
Merge pull request #3105 from JamesForks/language-blade
arfon Jul 13, 2016
9fcf546
Merge branch 'master' into apollo
arfon Jul 13, 2016
6a74391
Merge pull request #3113 from larsbrinkhoff/achromatic-markdown
arfon Jul 13, 2016
da2f4ed
Merge branch 'master' into apollo
arfon Jul 13, 2016
1e022f5
Updating Apollo to correct tm_scope
arfon Jul 13, 2016
fad13d9
Merge pull request #3095 from larsbrinkhoff/gcc-md
arfon Jul 13, 2016
c1203b7
Merge branch 'master' into apollo
arfon Jul 13, 2016
36ba378
Merge pull request #3115 from github/apollo
arfon Jul 13, 2016
5076539
Bumping to v4.8.8
arfon Jul 13, 2016
1d48ff5
Support for GDB
pchaigno Jun 28, 2016
44e532c
Update licensee to recognize zlib license
pchaigno Jul 12, 2016
311a687
Add zlib license for SublimeGDB
pchaigno Jul 14, 2016
2d62a47
Merge pull request #3090 from pchaigno/gdb
arfon Jul 14, 2016
d9edfb7
Merge branch 'master' into cut-release-v4.8.8
arfon Jul 14, 2016
3f4b836
Merge pull request #3116 from github/cut-release-v4.8.8
arfon Jul 14, 2016
91e0823
Replace DTrace sample with a premissive license
sahildua2305 Jul 17, 2016
7024c7c
Add REXX.
idrougge Jul 17, 2016
e84204a
Swap language grammar used for Roff highlighting
Alhadis Jul 20, 2016
f2ae3b6
Define additional extensions/names for Troff files
Alhadis Jul 20, 2016
93341be
Add language definition and samples for RUNOFF
Alhadis Jul 20, 2016
22609dc
Add heuristic to distinguish RUNOFF from Roff
Alhadis Jul 20, 2016
abfe89d
Kill orphaned submodule
Alhadis Jul 21, 2016
514a8d5
Add new language PowerBuilder (#3077)
sahildua2305 Jul 24, 2016
b29696d
Merge pull request #3123 from sahildua2305/replace-dtrace-samples
arfon Jul 29, 2016
b871460
Merge pull request #3124 from larsbrinkhoff/rexx
larsbrinkhoff Jul 29, 2016
1466b70
Merge pull request #3126 from Alhadis/roff
larsbrinkhoff Jul 29, 2016
d43f43c
add comment to file
jmarlena Aug 2, 2016
64a4401
Merge pull request #1 from jmarlena/patch-1
octocat Aug 2, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
File renamed without changes.
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Gemfile.lock
/Gemfile.lock
.bundle/
vendor/
benchmark/
lib/linguist/samples.json
/grammars
/node_modules
test/fixtures/ace_modes.json
/vendor/gems/
757 changes: 757 additions & 0 deletions .gitmodules

Large diffs are not rendered by default.

24 changes: 17 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
before_install:
- git fetch origin master:master
- git fetch origin v2.0.0:v2.0.0
- sudo apt-get install libicu-dev -y
- gem update --system 2.1.11
# Travis CI configuration settings
language: ruby
sudo: false
addons:
apt:
packages:
- libicu-dev
- libicu48
before_install: script/travis/before_install
script:
- bundle exec rake
- script/licensed verify
rvm:
- 1.9.3
- 2.0.0
- 2.1.1
- 2.1
- 2.2
notifications:
disabled: true
git:
submodules: false
cache: bundler
116 changes: 116 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Contributing

Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great. This project adheres to the [Contributor Covenant Code of Conduct](http://contributor-covenant.org/). By participating, you are expected to uphold this code.

The majority of contributions won't need to touch any Ruby code at all.

## Adding an extension to a language

We try only to add new extensions once they have some usage on GitHub. In most cases we prefer that extensions be in use in hundreds of repositories before supporting them in Linguist.

To add support for a new extension:

0. Add your extension to the language entry in [`languages.yml`][languages], keeping the extensions in alphabetical order.
0. Add at least one sample for your extension to the [samples directory][samples] in the correct subdirectory.
0. Open a pull request, linking to a [GitHub search result](https://github.com/search?utf8=%E2%9C%93&q=extension%3Aboot+NOT+nothack&type=Code&ref=searchresults) showing in-the-wild usage.

In addition, if this extension is already listed in [`languages.yml`][languages] then sometimes a few more steps will need to be taken:

0. Make sure that example `.yourextension` files are present in the [samples directory][samples] for each language that uses `.yourextension`.
0. Test the performance of the Bayesian classifier with a relatively large number (1000s) of sample `.yourextension` 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 `.yourextension` files then a [heuristic](https://github.com/github/linguist/blob/master/lib/linguist/heuristics.rb) may need to be written to help.


## Adding a language

We try only to add languages once they have some usage on GitHub. In most cases we prefer that each new file extension be in use in hundreds of repositories before supporting them in Linguist.

To add support for a new language:

0. Add an entry for your language to [`languages.yml`][languages].
0. Add a grammar for your language. Please only add grammars that have a license that permits redistribution.
0. Add your grammar as a submodule: `git submodule add https://github.com/JaneSmith/MyGrammar vendor/grammars/MyGrammar`.
0. Add your grammar to [`grammars.yml`][grammars] by running `script/convert-grammars --add vendor/grammars/MyGrammar`.
0. Download the license for the grammar: `script/licensed`. Be careful to only commit the file for the new grammar, as this script may update licenses for other grammars as well.
0. Add samples for your language to the [samples directory][samples] in the correct subdirectory.
0. Open a pull request, linking to a [GitHub search result](https://github.com/search?utf8=%E2%9C%93&q=extension%3Aboot+NOT+nothack&type=Code&ref=searchresults) showing in-the-wild usage.

In addition, if your new language defines an extension that's already listed 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!


## Fixing a misclassified language

Most languages are detected by their file extension defined in [languages.yml][languages]. For disambiguating between files with common extensions, linguist applies some [heuristics](/lib/linguist/heuristics.rb) and a [statistical classifier](lib/linguist/classifier.rb). This process can help differentiate between, for example, `.h` files which could be either C, C++, or Obj-C.

Misclassifications can often be solved by either adding a new filename or extension for the language or adding more [samples][samples] to make the classifier smarter.


## Fixing syntax highlighting

Syntax highlighting in GitHub is performed using TextMate-compatible grammars. These are the same grammars that TextMate, Sublime Text and Atom use. Every language in [languages.yml][languages] is mapped to its corresponding TM `scope`. This scope will be used when picking up a grammar for highlighting.

Assuming your code is being detected as the right language, in most cases this is due to a bug in the language grammar rather than a bug in Linguist. [`grammars.yml`][grammars] lists all the grammars we use for syntax highlighting on github.com. Find the one corresponding to your code's programming language and submit a bug report upstream. If you can, try to reproduce the highlighting problem in the text editor that the grammar is designed for (TextMate, Sublime Text, or Atom) and include that information in your bug report.

You can also try to fix the bug yourself and submit a Pull Request. [TextMate's documentation](https://manual.macromates.com/en/language_grammars) offers a good introduction on how to work with TextMate-compatible grammars. You can test grammars using [Lightshow](https://github-lightshow.herokuapp.com).

Once the bug has been fixed upstream, we'll pick it up for GitHub in the next release of Linguist.

## Testing

For development you are going to want to checkout out the source. To get it, clone the repo and run [Bundler](http://gembundler.com/) to install its dependencies.

git clone https://github.com/github/linguist.git
cd linguist/
script/bootstrap

To run the tests:

bundle exec rake test

Sometimes getting the tests running can be too much work, especially if you don't have much Ruby experience. It's okay: be lazy and let our build bot [Travis](https://travis-ci.org/#!/github/linguist) run the tests for you. Just open a pull request and the bot will start cranking away.

Here's our current build status: [![Build Status](https://api.travis-ci.org/github/linguist.svg?branch=master)](https://travis-ci.org/github/linguist)

## Maintainers

Linguist is maintained with :heart: by:

- @arfon (GitHub Staff)
- @larsbrinkhoff
- @pchaigno

As Linguist is a production dependency for GitHub we have a couple of workflow restrictions:

- Anyone with commit rights can merge Pull Requests provided that there is a :+1: from a GitHub member of staff
- Releases are performed by GitHub staff so we can ensure GitHub.com always stays up to date with the latest release of Linguist and there are no regressions in production.

### Releasing

If you are the current maintainer of this gem:

0. Create a branch for the release: `git checkout -b cut-release-vxx.xx.xx`
0. Make sure your local dependencies are up to date: `script/bootstrap`
0. If grammar submodules have not been updated recently, update them: `git submodule update --remote && git commit -a`
0. Ensure that samples are updated: `bundle exec rake samples`
0. Ensure that tests are green: `bundle exec rake test`
0. Bump gem version in `lib/linguist/version.rb`, [like this](https://github.com/github/linguist/commit/8d2ea90a5ba3b2fe6e1508b7155aa4632eea2985).
0. Make a PR to github/linguist, [like this](https://github.com/github/linguist/pull/1238).
0. Build a local gem: `bundle exec rake build_gem`
0. Test the gem:
0. Bump the Gemfile and Gemfile.lock versions for an app which relies on this gem
0. Install the new gem locally
0. Test behavior locally, branch deploy, whatever needs to happen
0. Merge github/linguist PR
0. Tag and push: `git tag vx.xx.xx; git push --tags`
0. Push to rubygems.org -- `gem push github-linguist-3.0.0.gem`

[grammars]: /grammars.yml
[languages]: /lib/linguist/languages.yml
[samples]: /samples
[new-issue]: https://github.com/github/linguist/issues/new
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
source 'https://rubygems.org'
gemspec
gemspec :name => "github-linguist"
gem 'byebug' if RUBY_VERSION >= '2.0'
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2011-2014 GitHub, Inc.
Copyright (c) 2011-2016 GitHub, Inc.

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
Loading