Commit Graph

76 Commits

Author SHA1 Message Date
John Gardner
24b368a30c Add ".es" to recognised ECMAScript extensions
* Add ".es" to recognised JavaScript extensions
* Add heuristic to differentiate Erlang from ECMAScript
* Add test-case for .es heuristic
2016-03-29 13:36:13 -06:00
Arfon Smith
1efd4c83f9 Merge pull request #2341 from github/api-changes
Move Linguist::Language.detect to Linguist.detect
2016-03-16 21:15:50 -06:00
Paul Chaignon
faec60188f Tests for .sql heuristic rules 2016-03-12 11:04:53 +01:00
Lars Brinkhoff
6f8a7d1070 Exclude 'filenames' from all_fixtures. 2016-03-09 13:28:00 +01:00
Paul Chaignon
d8666e5309 Heuristic for Pod vs. Perl
.pod files classified as Pod if they contain any Pod syntax
2016-01-16 11:21:26 +01:00
Lars Brinkhoff
dd8eaf2893 Alphabetise heuristics. 2015-08-31 08:53:51 +02:00
Arfon Smith
a74f3b3e46 Adding Perl/Perl6 heuristic for '.t' 2015-08-20 10:16:52 +01:00
Paul Chaignon
7d91e4959a Dissociate ECLiPSe from Prolog
ECLiPSe syntax is slightly different from Prolog syntax
ECLiPSe is in the Prolog group so it will only be highlighted differently
2015-08-19 20:56:14 +02:00
Arfon Smith
6b283068a9 Adding back R/Rebol heuristics 2015-08-04 12:20:15 +01:00
Arfon Smith
208ec3906f Fixing up some new heuristics 2015-08-04 12:06:41 +01:00
Arfon Smith
84d4fccb4d Merge pull request #2441 from pchaigno/associate-heuristic-with-extension
Associate heuristic rules with file extensions
2015-08-04 12:00:47 +01:00
Arfon Smith
6b747f7d65 Adding Charity and heuristic for xBase .ch files 2015-07-21 14:59:47 +01:00
rpavlick
2d392581e2 adding NCL language 2015-07-09 07:17:01 -07:00
Paul Chaignon
be122ca1a5 Fix test for Perl heuristic
Improve heuristic rule for Perl6
Separate heuristic rules for .pl (with Prolog) and .pm (without Prolog)
2015-06-06 19:55:04 +02:00
Paul Chaignon
e811021806 Fix tests to use the correct extension in heuristic rules
Extand a few tests where only one file was tested for a language
2015-06-06 18:27:59 +02:00
Tamir Duberstein
f32b7bb978 Fix duplicate key warning 2015-05-28 11:03:36 -04:00
Lars Brinkhoff
e018b4322e Improve .asc heuristic for Public Key. 2015-04-21 10:10:27 +02:00
Brandon Keepers
924fddf698 Move Linguist::Language.detect to Linguist.detect 2015-04-17 14:56:08 +12:00
Paul Chaignon
7c593899e7 Make heuristic for Prolog more specific 2015-03-01 12:43:35 +01:00
Paul Chaignon
e592381a54 Support for .pro INI files (KiCad project files)
Update the heuristic for .pro to include both INI and QMake files
Fixes #2116
2015-02-22 19:33:06 +01:00
Arfon Smith
7fd720bf39 Merge branch 'master' into ascii 2015-02-16 11:18:31 -08:00
Brandon Keepers
bdc724d548 Detect "use 5.xxx" as Perl 2015-02-09 10:19:36 -05:00
Edmundo Ruiz
9fa7adaa61 #1638 New heuristics to distinguish between AsciiDoc, AGS Script, and Public Key. 2015-02-03 00:43:53 -08:00
Arfon Smith
69b68f3a44 Extracting common methods into helper. 2015-01-26 16:22:55 -06:00
Paul Chaignon
bf5651e127 Merge branch 'master' into newlisp 2015-01-24 00:15:52 +01:00
Paul Chaignon
3c6218f20e Heuristics for .cs files: Smalltalk and C# 2015-01-04 22:07:29 +01:00
Adam Roben
65296e86a3 Switch to Minitest::Test instead of Test::Unit::TestCase
This gives us a consistent test framework across all Ruby versions which
should help avoid errors that are only found when CI runs the tests on
different Rubies. (And this fixes an immediate bug where there's no
`skip` method in the version of test-unit we're currently using only on
Ruby 2.2.)
2014-12-31 15:26:26 -05:00
Paul Chaignon
2418356eff Merge branch 'master' into newlisp 2014-12-16 10:52:17 -05:00
Arfon Smith
0ddf0d5d0d Merge branch 'master' into no-language
Conflicts:
	lib/linguist/heuristics.rb
2014-12-11 21:17:38 -06:00
Paul Chaignon
db70630eaa Renamed text in Text 2014-12-11 12:51:09 -05:00
Paul Chaignon
8b7d5546f7 Merge branch 'master' into newlisp 2014-12-06 20:04:18 -05:00
Paul Chaignon
b63423ce37 Merge branch 'master' into newlisp 2014-12-06 19:56:29 -05:00
Paul Chaignon
0b02b68538 Heuristic for .lsp and .lisp (Common Lisp, NewLisp) 2014-12-06 19:51:45 -05:00
Paul Chaignon
583392d179 Heuristic for .ts (TypeScript, XML) 2014-12-06 16:31:14 -05:00
Paul Chaignon
7458a2f9ff Heuristic for .bb (BitBake, BlitzBasic) 2014-12-06 15:26:30 -05:00
Lars Brinkhoff
de6b2f3307 Add 'text' language with samples, and heuristics for .fr. 2014-12-05 12:19:36 +01:00
Arfon Smith
f1282b857d Better output for failing test 2014-12-03 08:46:45 -06:00
Paul Chaignon
7dd318ca76 Use namespace.js for the heuristic test with no match 2014-12-02 20:36:18 -05:00
Paul Chaignon
4ddd8d9d2b Unit test for fix #1809 on heuristics 2014-12-02 20:06:12 -05:00
ellemenno
211cb9567a refactor heuristic tests to use new helper 2014-12-01 01:37:55 -05:00
ellemenno
1e68a45515 add test of ls disambiguation 2014-12-01 01:30:14 -05:00
Paul Chaignon
9367a4797f Remove old test forgotten in #1788 2014-11-28 23:14:17 -05:00
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
Brandon Keepers
bc66f558b9 Remove inactive heuristics
We can add these back when we’re ready to enable them.
2014-11-28 12:17:52 -06:00
Brandon Keepers
034cb25099 Refactor heuristics 2014-11-28 09:43:59 -06: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
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
245a1a92cf Merge remote-tracking branch 'origin/master' into test-helper
* origin/master:
  Add Gemfile.lock sample
  Remove deprecated method
  #all_extensions already includes primary extension
  typo
  remove unused assertion
  Symlink ant.xml to build.xml
  Avoid shadowing variable name
  Update comment
  Make missing sample failure message similar
  Remove blank extensions property
  Fix sample tests
  Add Forth extensions .f and .for; add heuristics for Forth and FORTRAN.
  Add FORTRAN and Forth samples.
  Extensions aren't actually required
  Fix errors from pedantic test
  Make pedantic test actually pedantic
  Removing extensions when they should be filenames
  Adding sample pom.xml files
  Link to contributing docs
  require samples if filename matches multiple languages

Conflicts:
	test/test_pedantic.rb
2014-11-18 16:48:26 -05:00
Brandon Keepers
aa7ab2065b Add test helper to make test env consistent 2014-11-18 16:46:09 -05:00
Lars Brinkhoff
03c1e725ce Add Forth extensions .f and .for; add heuristics for Forth and FORTRAN. 2014-11-18 20:21:19 +01:00