Commit Graph

91 Commits

Author SHA1 Message Date
Codecat
44048c9ba8 Add Angelscript language (#3844)
* Add AngelScript scriping language

* Add AngelScript sample

* Initial implementation of Angelscript

* Update Angelscript tm_scope and ace_mode

* Move Angelscript after ANTLR

* Updated grammar list

* Alphabetical sorting for Angelscript

* Angelscript grammar license is unlicense

* Add ActionScript samples

* Added a heuristic for .as files

* Whitelist sublime-angelscript license hash

* Added heuristic test for Angelscript and Actionscript

* Remove .acs from Angelscript file extensions
2017-10-14 17:34:12 +01:00
Santiago M. Mola
085604948e Add support for XPM. (#3706)
* .xpm and .pm extensions associated with XPM.

* .pm is disambiguated by searching the /* XPM */ string.
  This is how `file` performs detection and should work with
  every XPM3 file (most XPM generated by software later than 1991).

Added XPM samples:

* stick-unfocus.xpm: extracted from Fluxbox (MIT License)
  0c13ddc0c8/data/styles/Emerge/pixmaps/stick-unfocus.xpm

* cc-public_domain_mark_white.pm: public domain image from
  https://commons.wikimedia.org/wiki/File:Cc-public_domain_mark_white.svg
  converted to XPM with ImageMagick (convert input.svg output.xpm).
2017-07-22 14:19:22 +01:00
John Gardner
128abe3533 Fix spelling of Perl 6 (#3672)
Resolves #3671.
2017-06-20 19:39:39 +10:00
Santiago M. Mola
c0e242358a Fix heuristics after rename (#3556)
* fix Roff detection in heuristics

This affects extensions .l, .ms, .n and .rno.

Groff was renamed to Roff in 673aeb32b9851cc58429c4b598c876292aaf70c7,
but heuristic was not updated.

* replace FORTRAN with Fortran

It was already renamed in most places since 4fd8fce08574809aa58e9771e2a9da5d135127be
heuristics.rb was missing though.

* fix caseness of GCC Machine Description
2017-04-26 15:31:36 -07:00
Santiago M. Mola
e80b92e407 Fix heuristic for Unix Assembly with .ms extension (#3550) 2017-04-06 22:01:42 +10:00
Eloy Durán
f1be771611 Disambiguate TypeScript with tsx extension. (#3464)
Using the technique as discussed in #2761.
2017-02-20 10:17:18 +00:00
Paul Chaignon
79f20e8057 Heuristic rule for TeX .cls files (#3360) 2016-12-06 21:50:33 -08:00
Lars Brinkhoff
c863435c84 Add '</' to Markdown heuristic. (#3255) 2016-10-03 19:22:34 +02:00
Paul Chaignon
3ae89b48ba Improve Mathematica's heuristic rule
Use closing of Mathematica comment instead of opening
Unit test to check that test file is not detected as Mathematica anymore
2016-10-01 08:46:31 +02:00
Paul Chaignon
cd9401c424 Enable testing absence of heuristic result 2016-10-01 08:46:31 +02:00
Paul Chaignon
e7e8a7d835 Tests for .m heuristic rules 2016-10-01 08:46:31 +02:00
Lars Brinkhoff
a7a123a8db Add heuristic for .inc files: the #declare keyword is unique to POV-Ray.
Also added #local, #macro, and #while.
2016-09-22 07:02:44 +02:00
Sahil Dua
4361ccda32 Updating tests corresponding to changes in samples 2016-06-30 20:04:55 +05:30
Sahil Dua
b8892250d5 Remove deleted file name from tests 2016-06-28 02:11:54 +05:30
Paul Chaignon
8cf3b7ad51 Heuristic for .inc PHP files (#2980) 2016-05-03 21:15:20 -06:00
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