Commit Graph

1147 Commits

Author SHA1 Message Date
Brandon Keepers 7b41346db8 Merge branch 'refactor-heuristics' into 1036-local
* refactor-heuristics: (43 commits)
  update docs
  Clean up heuristic logic
  Allow disambiguate to return an Array
  Rename .create to .disambiguate
  docs
  Remove inactive heuristics
  Refactor heuristics
  Not going back
  docs
  Move call method into existing Classifier class
  Try strategies until one language is returned
  Remove unneded empty blob check
  Add F# and GLSL samples.  Add Forth and GLSL extension .fs. Add heuristic to disambiguate between F#, Forth, and GLSL.
  byebug requires ruby 2.0
  Remove test for removed extension
  Fix typo in test
  add rake interpreter
  add python3 interpreter
  Remove old wrong_shebang.rb sample
  Add byebug
  ...

Conflicts:
	lib/linguist/heuristics.rb
	test/test_heuristics.rb
2014-11-28 17:58:00 -06:00
Antoine Paris 71e1bd9af2 Misspelling correction 2014-11-28 17:42:54 +01:00
Antoine Paris 57b0739219 Add some examples for Oz 2014-11-28 17:40:49 +01:00
Brahn Partridge 43ee45d9b6 Merge branch 'master' of https://github.com/github/linguist
Conflicts:
	grammars.yml
2014-11-27 13:47:56 +01:00
Brahn Partridge 02db72515f removed less common extensions and better examples 2014-11-27 13:41:21 +01:00
Lars Brinkhoff 2d940e72c2 Add F# and GLSL samples. Add Forth and GLSL extension .fs.
Add heuristic to disambiguate between F#, Forth, and GLSL.
2014-11-27 06:56:26 +01:00
Brandon Keepers 689a209ed9 Merge remote-tracking branch 'origin/master' into interpreters-in-samples
* origin/master:
  byebug requires ruby 2.0
  Remove test for removed extension
  Merge branch 'master' into 1233-local
  Removing pry runtime dependency
  Moving to fixtures
  Language detection test for non-sample files
  Refactoring of Language.detect
  Try shebang detection if the extension is unknown
  Change unknown extension of PHP sample file
2014-11-26 16:25:15 -05:00
Brandon Keepers 0651568bfb Remove old wrong_shebang.rb sample
This was added in a69118bd17, but that test has since been removed.
2014-11-26 15:34:03 -05:00
Brahn Partridge af9b5f0e98 remove sample that is no longer used 2014-11-26 15:11:23 +01:00
Brahn Partridge 3445e55744 additional samples and fixed extensions list 2014-11-26 14:51:47 +01:00
Arfon Smith 208a3ff480 Merge branch 'master' into 1233-local
Conflicts:
	lib/linguist/language.rb
2014-11-25 17:04:43 -06:00
Paul Chaignon 230d91ecd8 Merge branch 'master' into saltstack-states 2014-11-25 15:41:25 -05:00
Arfon Smith 8de2cd15ed Merge branch 'master' into 1036-local
Conflicts:
	lib/linguist/heuristics.rb
	lib/linguist/languages.yml
	test/test_heuristics.rb
2014-11-25 13:06:11 -06:00
Brandon Keepers 7cbc4bc144 Merge pull request #1751 from roodboi/master
add .cjsx extension for Facebook’s JSX in coffescript
2014-11-24 11:30:04 -05:00
Brahn Partridge 036b9c4094 Hello world sample 2014-11-24 11:32:53 +01:00
Dimitri Kennedy 1d69228872 change component name 2014-11-20 16:49:48 -05:00
Dimitri Kennedy f5953a09da add example cjsx file 2014-11-20 16:48:22 -05:00
Max Horn 6072a63f99 Add GAP .tst extension plus two sample files 2014-11-20 12:47:15 -07:00
Manuel Rego Casasnovas 30c6b6e5a1 Add XHTML example file 2014-11-20 00:30:21 +01:00
Brandon Keepers a6f168d1ac Rename file to avoid case-insensitive collision 2014-11-18 23:22:10 -05:00
Brandon Keepers 719f6e876b Merge pull request #1732 from github/filename-matches-multiple-langages
Require samples if filename matches multiple languages
2014-11-18 16:31:19 -05:00
Brandon Keepers 63f9d0bdeb Add Gemfile.lock sample
Gemfile.lock should not actually get classified as Ruby, but we can fix that in another PR.
2014-11-18 15:36:42 -05:00
Brandon Keepers d7a032afcd Symlink ant.xml to build.xml
We require samples for explicitly defined filenames that matches multiple languages. This is generally a good thing, but in this case they will be identical.
2014-11-18 15:02:59 -05:00
Lars Brinkhoff 4cefaf2808 Add FORTRAN and Forth samples. 2014-11-18 20:12:39 +01:00
Brandon Keepers 757801e32f Merge remote-tracking branch 'origin/master' into filename-matches-multiple-langages
* origin/master:
  Allow mime-types 2.x to be used with Linguist
  Upgrade to rugged 0.22.0b1
  Mention that languages need to be quite popular
  fix vendor/cache
  Gemfile.lock is nolonger considered generated
  Tests for BlobHelper#empty?
  remove reference to empty.js
  Remove more empty samples
  Bail earlier if the file is empty.
  Moving comments
  Use heuristics earlier to inform the rest of the classification process
  Removing inconsistency of `find_by_heuristics` (was sometimes returning nil and sometimes returning and empty array)
  Removing unused array of candidate languages.
  Reworking most heuristics to only return one match
2014-11-18 14:09:15 -05:00
Arfon Smith 0443c4db2d Merge pull request #1674 from github/rework-heuristics
Rework heuristics
2014-11-18 10:43:01 -06:00
Arfon Smith c5344da2ba Removing extensions when they should be filenames 2014-11-17 16:44:39 -06:00
Arfon Smith c1b704075e Adding sample pom.xml files 2014-11-17 16:25:03 -06:00
Vicent Marti 5969a8b679 More samples 2014-11-14 19:18:43 +01:00
Vicent Marti f217047ac0 Rename 2014-11-14 19:06:41 +01:00
Vicent Marti 935c852364 Add Dockerfile sample 2014-11-14 19:05:42 +01:00
Vicent Marti a829f3143a Add DOT sample 2014-11-14 19:04:06 +01:00
Vicent Marti d290576543 Add Docker Files as a language 2014-11-14 18:16:51 +01:00
Paul Chaignon 9c64f72f35 Add .mm as an XML extension with heuristic rule 2014-11-12 19:38:54 -05:00
Brandon Keepers 92ace440b9 Merge pull request #1540 from rlespinasse/golo-support
Add support for Golo language
2014-11-08 14:00:36 -05:00
Brandon Keepers 754bc4ef6d Remove more empty samples 2014-11-06 14:56:19 -06:00
Brandon Keepers df55043500 Bail earlier if the file is empty.
This will change behavior for empty files with unique extensions, returning nil instead of the language.
2014-11-06 14:49:24 -06:00
Blake Embrey 42e9131b4f Add RAML support 2014-11-06 11:47:00 -06:00
Arfon Smith 0946791434 Merge branch 'master' into support-hack
Conflicts:
	lib/linguist/heuristics.rb
2014-11-04 16:09:00 -06:00
Arfon Smith 9d8ab16a38 Merge branch 'master' into 1623-local
Conflicts:
	lib/linguist/heuristics.rb
2014-11-02 20:11:49 -06:00
Geoff Nixon edadca9085 Add comment styles, don't choke on #!/usr/bin/env foo=bar... 2014-11-02 03:07:21 -08:00
Arfon Smith 9e50e188a8 Merge branch 'master' into 1233-local
Conflicts:
	lib/linguist/language.rb
	lib/linguist/languages.yml
	lib/linguist/samples.json
2014-11-01 10:04:22 -05:00
Arfon Smith 1a9ee8e187 Merge pull request #1636 from Verteiron/master
Add support for Papyrus scripts
2014-10-30 06:24:56 -05:00
Arfon Smith d4d6ef314d Merge branch 'master' into 1036-local 2014-10-28 19:14:43 -05:00
Arfon Smith a696e3a7a2 Merge pull request #1632 from ngn/master
Recognise *.dyalog as APL sources
2014-10-27 17:38:34 +00:00
ngn 8336dc33e4 Add sample .dyalog file for file type APL
Taken from
https://github.com/Gianfrancoalongi/APLUnit/blob/master/UT.dyalog
2014-10-27 10:35:23 +00:00
Verteiron 5f22bf225c Added extra Papyrus sample files. 2014-10-26 15:30:40 -05:00
Verteiron 8eee8ad9cf Add sample Papyrus script
This is the metaquest script from one of my own mods.
2014-10-26 14:58:17 -05:00
William Di Luigi 3504a36c3e Add LOLCODE support 2014-10-26 00:23:08 +02:00
Arfon Smith cf9998f3e4 Merge branch 'master' into 1036-local 2014-10-23 12:16:51 +01:00