Commit Graph

828 Commits

Author SHA1 Message Date
Paul Chaignon c5a654e692 Tests for Python multiline comments during tokenization 2014-11-25 20:01:24 -05:00
Arfon Smith 208a3ff480 Merge branch 'master' into 1233-local
Conflicts:
	lib/linguist/language.rb
2014-11-25 17:04:43 -06: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
Garen Torikian 4603f3b2e7 Update languages.yml to always include ace_mode 2014-11-24 11:38:51 -08:00
Garen Torikian 9d6b8b4715 Add test for catching missing ace_mode values 2014-11-24 10:58:13 -08:00
Adam Roben 04f1b1df48 Merge pull request #1756 from github/test-for-grammars
Test that all languages have grammars
2014-11-21 11:54:46 -05:00
Adam Roben ec3967d080 Change NONE to none
NONE is a little shouty.
2014-11-21 11:52:29 -05:00
Arfon Smith b6b2cf04a7 Checking other case for Chart.jS 2014-11-21 09:29:28 -06:00
Adam Roben 49247e9ec2 Test that all languages have grammars
This will make CI fail if someone adds a new language but neglects to
add a new grammar for it. This should make it easier for people to
review PRs, as CI will help them to make sure a new grammar gets added.

However, we currently support some languages that have no grammars, and
we may support more in the future. So you can explicitly mark the
language as having no grammar by setting `tm_scope: NONE` in
languages.yml.
2014-11-21 09:48:52 -05:00
Arfon Smith 38190d92fc Chart JS is vendored 2014-11-21 08:24:33 -06:00
Brandon Keepers 9823af0cb4 Fix for shebang with relative bin
`#!/usr/bin/env bin/linguist` is a valid shebang
2014-11-20 12:50:35 -05:00
Brandon Keepers 2670e2b035 Test that interpreters are defined in languages.yml 2014-11-20 11:21:52 -05:00
Brandon Keepers eccea65641 Fix for interpreters not getting add to samples.json 2014-11-20 11:14:05 -05:00
Arfon Smith 2a5dd5b224 Adding test for codemirror 2014-11-18 19:34:41 -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
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 850ab6dedb #all_extensions already includes primary extension 2014-11-18 15:10:07 -05:00
Brandon Keepers b20fa497b9 typo 2014-11-18 15:07:36 -05:00
Brandon Keepers 1abc7ee2ef remove unused assertion 2014-11-18 15:04:12 -05:00
Brandon Keepers 587c764950 Avoid shadowing variable name 2014-11-18 14:57:39 -05:00
Brandon Keepers 1abbcb6435 Update comment 2014-11-18 14:57:32 -05:00
Brandon Keepers 17f3d7005a Make missing sample failure message similar 2014-11-18 14:55:15 -05:00
Brandon Keepers ba8b55391d Fix sample tests 2014-11-18 14:48:21 -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
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
Brandon Keepers cd7549390e Extensions aren't actually required 2014-11-17 20:00:09 -05:00
Brandon Keepers b8e426d3a3 Make pedantic test actually pedantic
What do you call someone that thinks they are pedantic but actually
aren’t? All the crazy custom parsing in this test was making so it
wasn’t actually doing anything.
2014-11-17 18:52:53 -05:00
Arfon Smith 7d850d7c09 Gemfile.lock is nolonger considered generated 2014-11-17 16:31:47 -06:00
Brandon Keepers 07a6411a75 Link to contributing docs 2014-11-17 16:30:39 -05:00
Brandon Keepers b32bc5ef47 require samples if filename matches multiple languages 2014-11-17 16:18:56 -05:00
Brandon Keepers 3ca872cea8 Support for multiple file extension segments 2014-11-17 14:54:22 -05:00
Brandon Keepers 6bf8243014 Fix tests for Makefile change 2014-11-17 08:15:17 -05:00
Vicent Marti 5969a8b679 More samples 2014-11-14 19:18:43 +01:00
Vicent Marti d12aff9776 Unused test 2014-11-14 17:37:12 +01:00
Vicent Marti 4a10b27611 Remove Pygments 2014-11-14 17:37:12 +01:00
Brandon Keepers 296473507f Add assert for Emacs lisp
/cc https://github.com/github/linguist/pull/1499
2014-11-13 10:40:58 -05:00
Adam Roben 160598b9ef Make it safe to pass nil to Language.find_by_name/alias again
This restores compatibility with v3.4.x.
2014-11-10 15:12:29 -05:00
Adam Roben de188126fb Merge pull request #1683 from github/find-by-ext
Extract Language.find_by_extension
2014-11-10 14:37:45 -05:00
Adam Roben 97a1adcef1 Allow extensions without a leading dot
This makes the API a little easier to use.
2014-11-10 14:30:37 -05:00
Adam Roben d54f86ae58 Add some tests for Language.find_by_extension 2014-11-10 14:12:29 -05:00
Adam Roben 751360ecf1 Make Language.[] and Language.find_by(alias|name) ignore case
This makes it easier to find a Linguist::Language for a fenced code
block in Markdown, where language names are often specified in
lowercase.
2014-11-07 10:09:55 -05:00
Brandon Keepers 33d75d9623 Tests for BlobHelper#empty? 2014-11-06 15:14:03 -06:00
Brandon Keepers a0cc2c4c86 remove reference to empty.js 2014-11-06 14:59:34 -06:00
Arfon Smith f22524a615 Moving comments 2014-11-06 14:27:49 -06:00
Arfon Smith 0ab88919c9 Removing unused array of candidate languages. 2014-11-06 13:31:34 -06:00
Arfon Smith 114fabd29a Test for Hack heuristic 2014-11-04 16:12:46 -06:00
Brandon Keepers 06bcdba9c4 Merge pull request #1654 from danijar/master
Exclude minified JavaScript and CSS
2014-11-03 14:20:59 -05:00
Danijar Hafner 1dbbcb73e7 Add tests for minified JavaScript and CSS
Also, exclude -min.css pattern, like already done for JavaScript files
2014-11-03 19:41:31 +01:00