Commit Graph

911 Commits

Author SHA1 Message Date
Arfon Smith 07cd9aa994 Merge branch 'master' into FS-samples 2014-12-03 13:08:41 -06:00
Garen Torikian 1a3177409c Merge master 2014-12-03 20:15:55 +02:00
Brandon Keepers e446b86b90 Merge pull request #1813 from github/invalid-shebang
Fix detection for invalid shebang
2014-12-03 09:48:48 -08:00
Arfon Smith f1282b857d Better output for failing test 2014-12-03 08:46:45 -06:00
Brandon Keepers a5673e7fb6 Fix detection for invalid shebang 2014-12-02 21:03:39 -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 e5bc2845cd Fix for fixture tests: fixture files were not tested at all 2014-12-02 20:26:15 -05:00
Paul Chaignon 4ddd8d9d2b Unit test for fix #1809 on heuristics 2014-12-02 20:06:12 -05:00
Garen Torikian 768ec76ff0 Merge master 2014-12-01 15:52:37 +02: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
Arfon Smith cfd95360cb Merge pull request #1627 from github/1036-local
Disambiguate C, C++, Objective-C
2014-11-28 18:05:16 -06:00
Brandon Keepers 22144e79d3 Merge pull request #1787 from github/move-shebang
Move shebang (updated)
2014-11-28 18:02:04 -06: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
Garen Torikian 66eabd8bdc Prefer Yajl.load 2014-11-28 12:34:02 -08:00
Brandon Keepers 2517650ecb Fix shebang without path 2014-11-28 14:14:10 -06:00
Garen Torikian 1d4149168d Add Rake task to fetch ace_modes, and skip test if there's no internet 2014-11-28 11:48:26 -08:00
Garen Torikian 26ab33754f Merge master 2014-11-28 11:04:53 -08: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
Brandon Keepers 9020d7c044 Deprecate find_by_shebang
This class doesn’t need to know about shebangs.
2014-11-27 13:18:51 -05:00
Brandon Keepers ffe2ccf1f6 Don't bother creating an instance 2014-11-27 13:17:28 -05:00
Brandon Keepers 434ab9f2c0 Add tests for shebangs 2014-11-27 13:09:05 -05: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
Brandon Keepers 689a209ed9 Merge remote-tracking branch 'origin/master' into interpreters-in-samples
* origin/master:
  byebug requires ruby 2.0
  Remove test for removed extension
  Merge branch 'master' into 1233-local
  Removing pry runtime dependency
  Moving to fixtures
  Language detection test for non-sample files
  Refactoring of Language.detect
  Try shebang detection if the extension is unknown
  Change unknown extension of PHP sample file
2014-11-26 16:25:15 -05:00
Brandon Keepers 3edf5fd770 Remove test for removed extension
This existed when the test was written, but was removed in https://github.com/github/linguist/pull/1734 and the test got lost in a merge somewhere.
2014-11-26 15:59:16 -05:00
Arfon Smith 412af86cb8 Merge pull request #1538 from github/1233-local
Detection based on the shebang (updated)
2014-11-26 14:47:12 -06:00
Brandon Keepers 5b41ab4774 Fix typo in test 2014-11-26 15:40:51 -05:00
Brandon Keepers ce31e23006 Merge remote-tracking branch 'origin/master' into interpreters-in-samples
* origin/master: (30 commits)
  Add byebug
  Link to Lightshow in CONTRIBUTING.md
  Switch to a better F# grammar
  Bump Rugged again
  Checkout the master for testing
  Rugged 0.22.0b3
  Reordering
  Bump version to 4.0.3
  Add some docs for tm_scope
  Change NONE to none
  Checking other case for Chart.jS
  Test that all languages have grammars
  Fix RHTML's tm_scope
  Chart JS is vendored
  Switch to a better grammar for Bro
  reorder again…
  put cjsx at the top
  Use a SQF grammar for SQF files
  move cjsx before iced
  move cjsx before iced
  ...

Conflicts:
	lib/linguist/languages.yml
2014-11-26 15:17:08 -05:00
Brandon Keepers 4ed1efe9ce Merge pull request #1741 from github/test-helper
Add test helper to make test env consistent
2014-11-26 15:10:24 -05:00
Brandon Keepers 6a4bf3fa65 Merge pull request #1731 from github/multiple-ext-segments
Support for multiple file extension segments
2014-11-26 15:09:15 -05:00
Brandon Keepers 5b2b3a2b53 Merge remote-tracking branch 'origin/master' into test-helper
* origin/master: (31 commits)
  Link to Lightshow in CONTRIBUTING.md
  Switch to a better F# grammar
  Bump Rugged again
  Checkout the master for testing
  Rugged 0.22.0b3
  Reordering
  Bump version to 4.0.3
  Add some docs for tm_scope
  Change NONE to none
  Checking other case for Chart.jS
  Test that all languages have grammars
  Fix RHTML's tm_scope
  Chart JS is vendored
  Switch to a better grammar for Bro
  reorder again…
  put cjsx at the top
  Use a SQF grammar for SQF files
  move cjsx before iced
  move cjsx before iced
  change component name
  ...

Conflicts:
	test/test_language.rb
2014-11-26 15:07:27 -05:00
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