Joshua Peek
67ed060d37
Assert CodeMirror modes and mime types are valid against source
2016-09-23 16:33:12 -07:00
Joshua Peek
3abe081560
Validate codemirror modes
2016-09-23 16:30:38 -07:00
Joshua Peek
855f1a1f86
Validate CodeMirror modes
2016-09-23 14:47:49 -07:00
Joshua Peek
0108ef4386
Restore old mode
2016-09-23 14:35:02 -07:00
Joshua Peek
fdb962518f
Consistent CodeMirror casing
2016-09-23 13:54:55 -07:00
Joshua Peek
6564078061
Merge branch 'master' into change_modes_to_mimetypes
2016-09-23 13:54:20 -07:00
Joshua Peek
39ea9be5f8
Ignore ace mode warning while testing
2016-09-23 13:53:38 -07:00
Joshua Peek
152b5ade5e
Fix shadowed path warning
2016-09-23 13:50:01 -07:00
Joshua Peek
c525e3fbef
Ignore default external warnings
2016-09-23 13:49:30 -07:00
Todd Berman
88c74fa9c2
Convert from mode names to mimetypes for better usage.
2016-09-23 13:40:19 -07: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
Arfon Smith
6fcba83f3e
Merge branch 'master' into 3227-local
2016-09-21 20:55:07 -07:00
Todd Berman
d6d7d38eb8
Fix w/ a test
2016-09-21 20:52:49 -07:00
Arfon Smith
c8094d3775
Merge branch 'master' into 3227-local
2016-09-21 20:26:51 -07:00
Arfon Smith
f30e9270f1
Merge pull request #3197 from Alhadis/modelines
...
Revise patterns for Vim modeline detection
2016-09-21 20:13:28 -07:00
Arfon Smith
30298a9ef8
Whitelist troublesome licenses
2016-09-21 09:27:35 -07:00
Alhadis
697380336c
Revise pattern for Emacs modeline detection
...
This is a rewrite of the regex that handles Emacs modeline matching. The
current one is a little flaky, causing some files to be misclassified as
"E", among other things.
It's worth noting malformed modelines can still change a file's language
in Emacs. Provided the -*- delimiters are intact, and the mode's name is
decipherable, Emacs will set the appropriate language mode *and* display
a warning about a malformed modeline:
-*- foo-bar mode: ruby -*- # Malformed, but understandable
-*- mode: ruby--*- # Completely invalid
The new pattern accommodates this leniency, making no effort to validate
a modeline's syntax beyond readable mode-names. In other words, if Emacs
accepts certain errors, we should too.
2016-09-17 19:45:43 +10:00
Arfon Smith
e1216ea4ee
Merge branch 'language-id' of github.com:github/linguist into language-id
2016-09-13 11:14:19 -07:00
Arfon Smith
a3227c2c27
Adding basic find_by_id functionality to Language
2016-09-13 11:09:05 -07:00
Paul Chaignon
65201b322a
Test the uniqueness of language ids
2016-09-13 13:10:07 +02:00
Arfon Smith
1f43664a51
Adding some tests for some known language_ids
2016-09-12 22:10:59 -07:00
Arfon Smith
7cda13afcb
A Language should know about it's language_id
2016-09-12 22:02:49 -07:00
Alhadis
abf7bee464
Include tests for version-specific Vim modelines
2016-09-12 20:00:05 +10:00
Alhadis
e73a4ecd0e
Allow " ex:" to match at beginning of file
...
Although unlikely to be valid syntax in most programming languages, such
a modeline is valid syntax in Vim, and will trigger any filetype modes.
2016-09-12 19:59:08 +10:00
Alhadis
22d4865c52
Revise patterns for Vim modeline detection
...
The current expressions fail to match certain permutations of options:
vim: noexpandtab: ft=javascript:
vim: titlestring=foo\ ft=notperl ft=javascript:
Version-specific modelines are also unaccounted for:
vim600: set foldmethod=marker ft=javascript: # >= Vim 6.0
vim<600: set ft=javascript: # < Vim 6.0
See http://vimdoc.sourceforge.net/htmldoc/options.html#modeline
2016-09-11 00:51:03 +10: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
Sahil Dua
5ac2cdde50
Add fontello CSS files to vendor.yml ( #3068 )
2016-06-22 07:05:28 +02:00
Sahil Dua
56a65d0975
Add ace-builds to vendored files ( #3061 )
2016-06-21 06:45:37 -06:00
Charlie Briggs
c471990aa3
Add npm-shrinkwrap.json to generated files ( #3048 )
...
This file is generated by the `npm shrinkwrap` command. It's large,
generated, and has a noisey diff. One similar file, php composer lock
files, is already ignored.
Closes https://github.com/github/linguist/issues/3045
2016-06-13 13:10:13 -06:00
Steven Honson
1968f8193c
Remove .lock from JSON extentions
2016-05-11 16:38:24 +10:00
Arfon Smith
3191ff498d
2945 local ( #2992 )
...
* Added Django environment folder in exclusion
Django projects have env/ folder in which dependencies of the project like Django, Pillow, and other libraries are installed from the requirements.txt file. It would be best if this folder of dependencies is ignored from the language statistics.
* Corrected Errors
Corrected the misplaced code and put removed the start character as the environment folder may not always be in the root.
* Adding test for env folder
2016-05-06 15:36:07 -06:00
Jan Olaf Krems
905d87a112
Detect .js files with source maps as generated ( #2984 )
...
* Fix .min.js test
* Detect .js files with source maps as generated
2016-05-06 15:20:42 -06:00
Paul Chaignon
5c19f1f546
Limit scope of modeline search ( #2967 )
...
Only matches the first and last 5 lines against the modeline regular expressions
2016-05-05 09:33:40 -06:00
Paul Chaignon
8cf3b7ad51
Heuristic for .inc PHP files ( #2980 )
2016-05-03 21:15:20 -06:00
John Gardner
99ad2368b0
Add ISC to license whitelist
...
Add ISC to license whitelist
2016-03-31 09:19:30 -07: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
James Ko
c7868a95bc
Merge pull request #2902 from jamesqo/patch-2
...
Add App.config + NuGet.config to the XML file list
2016-03-23 20:11:36 -06:00
Paul Chaignon
270fa8f5d3
Merge pull request #2894 from pchaigno/fix-warnings
...
Fix warnings
2016-03-19 20:42:32 -06:00
Arfon Smith
1a11664239
Adding sublimeassembly to license whitelist.
2016-03-18 20:24:06 -06:00
Arfon Smith
5b9ea4a78f
Updating grammar checks to ensure license compliance
2016-03-18 16:47:34 -06:00
Arfon Smith
b72c4d4400
Fix Ruby deprecation warning
2016-03-18 16:47:09 -06:00
Arfon Smith
92904efd45
Fixing Ruby warning
2016-03-18 16:19:35 -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
Jesse Glick
ca4ea03828
Recognizing Jenkinsfile as Groovy source.
2016-03-03 19:15:09 -05:00
Arfon Smith
57f5a3e780
Merge pull request #2831 from FarbodSalamat-Zadeh/patch-1
...
Add CSV as data type to languages.yml
2016-02-27 15:54:44 -07:00
Farbod Salamat-Zadeh
3be007526c
Fix fixture_blob("Data/cars.csv")
...
Changes `fixture_blob("Data/cars.csv")` to `sample_blob("CSV/cars.csv")`
2016-02-27 15:30:22 +00:00
Farbod Salamat-Zadeh
9bfbd0550c
Move cars.csv from test/fixtures/Data to samples/CSV
2016-02-27 14:32:50 +00:00