Commit Graph

147 Commits

Author SHA1 Message Date
Joshua Peek
076bf7d0c8 Use classifier as primary method for disambiguation 2012-06-21 10:55:26 -05:00
Joshua Peek
9c9607e42c Log regexp and classifier guess mismatches 2012-06-20 16:20:59 -05:00
Michael Ficarra
11166911dc Recognise that PEG.js-generated parsers are in fact generated 2012-06-19 11:18:51 -05:00
Joshua Peek
5d2e9e04a9 Raise don't warn 2012-06-07 10:16:25 -05:00
Joshua Peek
0b73b11f63 Suppress Xcode Storyboards 2012-06-06 23:50:03 -05:00
Rob Sanheim
1c7b8ebe71 Make colorize safer:
- don't try to colorize blobs that have a high ratio of
    long lines -- these are most likely minified files or something else
    strange that will blow up Pygments.rb
  - re github/github#3938
2012-05-21 11:33:01 -05:00
Joshua Peek
2729f2200d Fix 1.9 string grep 2012-05-09 09:58:55 -05:00
Joshua Peek
35fe44549e Fix empty .m file 2012-05-09 09:52:14 -05:00
Andrew D. Horchler
354e1fc85e More robust heuristics for .m files and 3 new Matlab tests. Support for Obj-C detection fully intact; all tests pass. Detection of Obj-C keywords @implementation, @property, @interface, and @synthesize removed to avoid possible conflicts with user-created Matlab function handles. Only @end is needed, which is not valid in Matlab. Matlab class files supported. Comments preceded by whitespace detected for Obj-C and Matlab.
Signed-off-by: Andrew D. Horchler <adh9@case.edu>
2012-05-08 18:31:18 -04:00
Vicent Martí
4d984e9622 Colorize all files, even if they are generated 2012-04-29 16:01:02 -07:00
Joshua Peek
4c0a8b1ccf Ensure our custom mime types override mime-types lib 2012-03-28 10:22:32 -05:00
Abe Voelker
22db59d8c0 Improve .cls language detection 2012-03-21 11:21:55 -05:00
Abe Voelker
d32c9e88b4 Add support for OpenEdge ABL language 2012-03-05 08:58:19 -06:00
Joshua Peek
d80ee601ed Merge pull request #125 from abevoelker/detect-coq-language
Add detection for the Coq language - fixes #116
2012-03-05 06:03:23 -08:00
Abe Voelker
daef609f5f Add detection for the Coq language - fixes #116 2012-02-17 10:50:21 -06:00
Joshua Peek
101676d90b Gemfile.locks are generated 2012-02-15 15:59:06 -06:00
Joshua Peek
7974d23444 Detect CoffeeScript with generated comment 2012-01-16 16:57:30 -06:00
Joshua Peek
395a88aa97 Remove VS project file supression 2011-12-23 10:17:49 -06:00
Aman Gupta
7cdee48bab handle missing blob mode 2011-11-23 03:00:18 -08:00
Aman Gupta
d2118d1471 only check for shebangs in executable files 2011-11-23 01:37:01 -08:00
Aman Gupta
61a59c8e84 avoid load_blob and shebang check on files with extensions
previously, any file with an unrecognized file extension was loaded to
check for a shebang. now, this only occurs if the file has a generic
name with no file extension (like ./script)

it is possible this will no longer match certain scripts with esoteric
extensions (if we find these we can add them to the shebang_extname?
method). however, most common script extensions (.sh, .rb, .pl, etc)
will continue to work since the file extension takes precedence over the
shebang line.
2011-11-23 00:54:40 -08:00
Aman Gupta
9994ac3a0c only load blobs to check for <?php header for specific drupal file extensions 2011-11-23 00:50:44 -08:00
Aman Gupta
21488c84c3 delay calls to binary? in guess_language until viewable?, to avoid loading blobs for well known file extensions 2011-11-23 00:49:59 -08:00
Aman Gupta
bb4840ca3e viewable? should not load or binary check large blobs 2011-11-23 00:49:11 -08:00
Aman Gupta
4b9a1c297b bail fast on file extensions we recognize as binary 2011-11-23 00:32:14 -08:00
Joshua Peek
e4fe1d17e7 Add tests for Perl and Turning detection 2011-11-21 10:42:39 -06:00
Joshua Peek
0b5a265644 Cleanup whitespace 2011-11-21 10:20:19 -06:00
Tristan Hume
5d4057324f Added Turing language detection 2011-11-16 18:55:55 -05:00
Joshua Peek
e562369110 Skip colorizing minified js 2011-10-10 11:29:58 -05:00
Joshua Peek
6a2d84d422 Don't send blank attachment filename 2011-09-28 10:48:55 -05:00
Joshua Peek
6e03f954bc Large blobs should be binary 2011-09-28 10:14:46 -05:00
Joshua Peek
caa39a2bcf Use Charlock all the time for binary detection 2011-09-28 09:57:33 -05:00
Joshua Peek
84df2aaa0a Encoding could still be nil 2011-09-27 10:18:44 -05:00
Joshua Peek
1c24de490b Treat as binary if encoding is nil 2011-09-08 13:30:21 -05:00
Joshua Peek
7ed26bfcf3 Use charlock to detect binary blobs 2011-09-06 19:58:29 -05:00
Joshua Peek
350465d84d Fix groovy regexp warning 2011-08-30 14:29:18 -05:00
Joshua Peek
a733ba819e Merge pull request #68 from github/pygments.rb
Replace Lexer with Pygments::Lexer
2011-08-30 11:57:31 -07:00
Jeff Beck
5c93120502 Fix for Ruby 1.8.7
Added a test to catch the case better
2011-08-29 12:21:46 -05:00
Jeff Beck
3dd06de711 Adding support to detect the difference between a Grails gsp and a Gosu gsp. 2011-08-29 11:31:39 -05:00
Joshua Peek
0864b9847f Replace Lexer with Pygments::Lexer 2011-08-23 12:41:06 -05:00
Paul Betts
6f51c8fc63 The C# compiler bizarrely generates docfiles with uppercase extensions - recognize those too 2011-08-10 22:37:48 -07:00
Paul Betts
0f1c9c48fa Suppress .NET XML Intellisense generated files 2011-08-03 12:09:36 -07:00
Joshua Peek
86e2246e66 Style 2011-07-27 23:12:48 -05:00
Joris den Ouden
5eec0034d1 XCode and Visual Studio project detection in seperate methods 2011-07-26 22:13:25 +02:00
Joris den Ouden
d0824ee3b2 Detect Visual Studio project files, solution files and resource files as generated 2011-07-26 20:00:35 +02:00
Jonathan Sterling
de96f950b3 Detect .xcworkspacedata and .xcuserstate files as generated
Xcode 4 generates more XML files than ever: update `generated?` to recognize
them as such.
2011-07-13 14:54:21 -07:00
Joshua Peek
04179de2f6 Note where tests are 2011-07-06 10:18:01 -05:00
Joshua Peek
d3a3358402 Fix instance methods check on 1.9 2011-07-06 09:20:17 -05:00
Joshua Peek
6611f174e5 Dispatch to ambiguous language guess method 2011-07-05 20:11:07 -05:00
Joshua Peek
96a14e795b Merge branch 'detect-prolog' of https://github.com/tautologico/linguist into tautologico-detect-prolog
Conflicts:
	lib/linguist/blob_helper.rb
	test/test_blob.rb
2011-07-05 16:06:22 -05:00