Commit Graph

5705 Commits

Author SHA1 Message Date
Colin Seymour
fb77fdcd53 Update submod sha 2018-02-12 14:12:16 +00:00
Colin Seymour
5306d65e79 Force use of my test branch 2018-02-12 14:07:26 +00:00
Colin Seymour
24fa4c82f3 Use lildude's fork 2018-02-12 13:56:06 +00:00
Nathaniel J. Smith
2abf488e65 Treat "python3" as an alias for "python" (#4026)
Pygments has separate highlighters for "python" (meaning python 2) and "python3" (meaning python 3). As a result, there are lots of files out there (especially ReSTructured text) that contain code blocks whose language is explicitly given as "python3" or "py3". Currently these are unrecognized by linguist. Instead, we should use our python highlighter for them (which works for both python 2 and python 3).

References:
  http://pygments.org/docs/lexers/#pygments.lexers.python.Python3Lexer
  https://github.com/github/markup/issues/1019
  https://github.com/python-trio/async_generator/pull/12
2018-02-08 09:52:21 +00:00
Tobias V. Langhoff
812797b51d Add "asm" as alias for assembly (#4019) 2018-01-31 11:56:47 +00:00
Tobias V. Langhoff
dc32876113 Fix anchor link in README.md (#4018) 2018-01-30 21:41:45 +01:00
Colin Seymour
a18ad1d489 Release v6.0.1 (#4016)
* Update grammar submodule refs

* Bump version to v.6.0.1
v6.0.1
2018-01-30 15:17:58 +00:00
Vicent Martí
25ac140d58 compiler: Allow loading grammars from syntaxes folder (#4015) 2018-01-30 12:49:28 +01:00
Vicent Martí
f7835f7119 compiler: Do not load TreeSitter grammars (#4013) 2018-01-29 18:14:14 +01:00
Vicent Martí
a7f835a653 compiler: Prefer specific grammar formats (#4012)
* compiler: Simplify the Dockerfile

* compiler: Prefer grammar extensions based on type
2018-01-29 14:40:23 +01:00
Ilias Van Peer
6220286f42 Re-enable Elm support (#4007)
The submodule was pointing to a repo which no longer has a tmLanguage
definition. We've now reinstated such a repo, with a tmLanguage file
existing in the master branch.

Since we reinstated this repo with the same name (as the old name
redirected to a new repo), the commit used is the only change.
2018-01-28 09:22:47 +00:00
Colin Seymour
15e2b74dec Release v6.0.0 (#4002)
* Update all submodules

* Ensure always using lastest docker image

* Allow passing in GEM_VERSION from env

This is useful to building test gems in a cache friendly way using:
`GEM_VERSION=$(git describe --tags 2>/dev/null | sed 's/-/./g' | sed
's/v//') bundle exec rake build_gem`

* Update submodules one last time

* Set version 6.0.0
v6.0.0
2018-01-26 13:12:12 +00:00
gauravsavadi
969333610c Replacing MATLAB Language bundle (#4000)
* Updated readme to new MATLAB language grammar

* added MATLAB language grammer

* Update .gitmodules

* Update .gitmodules

* Update grammars.yml
2018-01-26 07:10:21 +00:00
Vicent Martí
8438c6cd3e compiler: Do not output empty grammars (#4001) 2018-01-25 14:49:03 +01:00
Dylan Simon
60f748d47b Add .x as XDR/RPCGEN (#3472)
* Add .x as XDR/RPCGEN

XDR/RPC language as documented in RFC5531, RFC4506.
Samples are from glibc and RFCs.

* Add Logos samples

https://github.com/JonasGessner/NoCarrier/blob/master/NoCarrier.x - MIT
cf31f4e466/llvm-gcc-R3/gcc/testsuite/objc/execute/string1.x - GPL2
f6415578fa/perapp-plugin/Tweak.x - GPL3
d1b3e83888/NCHax.x - Apache

* Add disambiguate heuristics for .x

* Add RPC to vendor/README.md
2018-01-25 09:15:09 +00:00
Seppe Stas
8da6ddf9d9 Override languages being included by language statistics (#3807)
* Add detectable key to languages

This key allows to override the language being included in the
language stats of a repository.

* Make detectable override-able using .gitattributes

* Mention `linguist-detectable` in README

* Remove detectable key from languages

Reverts changes in 0f7c0df5.

* Update commit hash to the one that was merged

PR #3806 changed the commit hash. The original commit was not
actually merged into the test/attributes branch.

* Fix check to ensure detectable is defined

* Add include in language stats tests when detectable set

* Ignore detectable when vendored, documentation or overridden

* Add documentation on detectable override in README

* Improve documentation on detectable override in README
2018-01-23 12:17:48 +00:00
Rajendra arora
fef7a12c85 Added Travis-ci build passing markup icon (#3995) 2018-01-20 18:52:26 +00:00
Vicent Martí
b80ca35b75 Update release docs with grammars tarball instructions (#3994) 2018-01-19 12:12:02 +01:00
Vicent Martí
c8171322f5 script: Add build-grammars-tarball (#3992) 2018-01-18 18:23:55 +01:00
Colin Seymour
4c1e61892a Bump escape_utils to ~> 1.2.0 (#3981)
There are very few changes between 1.1.x and 1.2.x, and I can't see any
that would indicate this would break anything. It does however fix
https://github.com/github/linguist/issues/3797 and
https://github.com/github/linguist/issues/3649 thus allowing peeps to
install Linguist on Windows using rubyinstaller2.
2018-01-18 09:53:50 +00:00
Paul Chaignon
4db659dede Whitelist hideFromUser key in grammars (#3989)
hideFromuser is an undocumented key from TextMate to hide some
grammars from the user.
2018-01-16 10:49:33 +01:00
Colin Seymour
ed73a72cbe Add issue and pull request templates (#3972)
* Add issue and pull request templates

* Implement feedback

* Request new and old grammar refs

* Add note about vendor, documentation, and generated lists

* Implement @Alhadis's suggestions
2018-01-15 10:11:53 +00:00
Brandon Elam Barker
512f077da8 adding the .kojo extension for Scala (#3960) 2018-01-13 09:38:34 +00:00
Josh Padnick
3260b06241 Format .tfvars file as HashiCorp Config Language. (#3885)
* Format .tfvars file as HashiCorp Config Language.

* Add sample terraform.tfvars file to demonstrate HCL rendering.
2018-01-12 17:27:41 +00:00
BRAMILLE Sébastien
ef3b0b6af3 Add solidity language (#3973)
* add solidity language

* add solidity color

* move samples to test fixtures

they're not used by the bayesian classifier

* Update languages.yml

* Rename RefundVault.sol to RefundVault.solidity

* Rename pygments-example.sol to pygments-example.solidity

* Change color from #383838 to #AA6746

`Color #383838 is too close to ["3F3F3F", "383838"]`

* Fix test

* Remove test/fixtures and add samples

* Remove extension

* Remove sample file
2018-01-12 17:26:51 +00:00
Colin Seymour
434023460e Revert "Check generated Jest snap file" (#3984)
* Revert "Remove Arduino as a language (#3933)"

This reverts commit 8e628ecc36.

* Revert "Check generated Jest snap file (#3874)"

This reverts commit ca714340e8.
2018-01-12 11:49:02 +00:00
oldmud0
8e628ecc36 Remove Arduino as a language (#3933)
* Remove Arduino as a language

* Move Arduino samples to C++

* Move .ino entry to its correct place
2018-01-11 10:48:19 +00:00
Yuya Takeyama
ca714340e8 Check generated Jest snap file (#3874)
* Check generated Jest snap file

* Check file name rule first

ref: https://github.com/github/linguist/pull/3874/files#r146168309

* Check extension first

It must be cheaper
ref: https://github.com/github/linguist/pull/3874/files#r146168426
2018-01-11 09:25:13 +00:00
DoctorWhoof
a4e6fc78c8 Added a few Monkey2 examples (#3811)
* Added Monkey2 (extension .monkey2) example

This compiles with the most up to date Monkey2 release (V1.1.06).

* Sorting example in Monkey2

* Add files via upload

* Gui example using the MojoX module
2018-01-11 09:23:54 +00:00
Egor Zhdan
db1d4f7893 Add Materialize.css to the vendor list (#3943) 2018-01-11 09:48:49 +01:00
Paolo Di Tommaso
bee7e55618 Add Nextflow language support (#3870)
* Added nextflow language
* Added main.nf to list of filenames
* Fixed duplicate groovy scope
* Removed hello-world example
* Update grammar submodule
* Removed main.nf from filenames
* Added nextflow.config example
2018-01-09 12:47:59 +01:00
Ashe Connor
5fbe9c0902 Allow classifier to run on symlinks as usual (#3948)
* Fixups for symlink detection, incl. test

* assert the heuristics return none for symlink
2018-01-08 09:01:16 +11:00
Paul Chaignon
a840668599 perl6 alias for Perl 6 (#3977)
Many repository rely on `perl6` as a Markdown key for code snippet
highlighting. The new Perl 6 name breaks this behavior as it requires
`perl-6` as the Markdown key.
2018-01-07 21:32:55 +01:00
Paul Chaignon
38cb8871ba Update URL for HTTP grammar (#3966) 2018-01-01 21:57:13 +01:00
Colin Seymour
d0b906f128 Update README and CONTRIBUTING documentation (#3955)
* Add more troubleshooting info

* Add more updates

* A lot more words and reformatting

* Few more tweaks

* Add how it works on GitHub.com

* More clarifications

* Feedback tweaks

* Add missing run

* Learn grammar
2017-12-21 13:17:20 +00:00
Ashe Connor
d4c2d83af9 Do not traverse symlinks in heuristics (#3946) 2017-12-12 21:53:36 +11:00
Ashe Connor
0b81b21983 Grammar compiler invocation fix (#3945)
* Correct grammar-compiler invocation in build_gem

/cc @vmg

* || true so we can release with broken grammars
2017-12-12 09:41:21 +01:00
Colin Seymour
1a769c4665 Handle repo cleanup race more elegantly (#3930)
* Don't attempt to get pwd for error message

* Print error instead of raising exception

This is more user-friendly too.

* Switch back to raise, but rescue it too

* Refactor
2017-12-11 12:37:21 +00:00
Vicent Martí
e7e64bf39a compiler: Add error output to the compiler (#3935) 2017-12-04 19:20:38 +01:00
Paul Chaignon
e4b9430024 Vendor CSS files in font-awesome directory (#3932) 2017-12-02 15:24:05 +01:00
Paul Chaignon
a76805e40d Improve Prolog .pro heuristic to avoid false positives (#3931)
The `[a:-b]` syntax for index selection in arrays is valid in IDL and
matches the heuristic for Prolog. Update the Prolog heuristic to
exclude `[`.
2017-12-02 15:08:19 +01:00
Ashe Connor
8d27845f8c drop max token len to 32 (#3925) 2017-12-01 19:33:50 +11:00
Ashe Connor
9a8ab45b6f Limit tokens to 64 characters or less (#3922) 2017-12-01 13:41:59 +11:00
Vicent Martí
e335d48625 New Grammars Compiler (#3915)
* grammars: Update several grammars with compat issues

* [WIP] Add new grammar conversion tools

* Wrap in a Docker script

* Proper Dockerfile support

* Add Javadoc grammar

* Remove NPM package.json

* Remove superfluous test

This is now always checked by the grammars compiler

* Update JSyntax grammar to new submodule

* Approve Javadoc license

* grammars: Remove checked-in dependencies

* grammars: Add regex checks to the compiler

* grammars: Point Oz to its actual submodule

* grammars: Refactor compiler to group errors by repo

* grammars: Cleanups to error reporting
2017-11-30 16:15:48 +01:00
NachoSoto
4f46155c05 Add Carthage/Build to generated list so it doesn't show in PR diffs (#3920)
Equivalent to #3865, but for Carthage.
2017-11-29 14:26:23 +00:00
NachoSoto
38901d51d2 Changed Carthage vendor regex to allow folder in any subdirectory (#3921)
In monorepro projects, it's not uncommon for `Carthage` to not be in the root directory.
2017-11-29 14:25:04 +00:00
Shai Mishali
ded0dc74e0 Add Cocoapods to generated list so it doesn't show in PR diffs (#3865)
* Add Cocoapods to generated list so it doesn't show in PR diffs

* Removed Cocoapods from vendor.yml

* Enhance regex to match only Cocoapod's Pods folder

* Adds additional test cases for generated Pods folder
2017-11-28 11:04:18 +00:00
Colin Seymour
c5d1bb5370 Unvendor tools/ (#3919)
* Unvendor tools/

* Remove test
2017-11-28 10:52:02 +00:00
Andrey Sitnik
c8ca48856b Add PostCSS syntaxes support (#3916) 2017-11-26 16:21:10 +11:00
John Gardner
7be6fb0138 Test Perl before Turing when running heuristics (#3880)
* Test Perl before Turing when running heuristics

* Revise order of Perl 5 and 6 in `.t` heuristic

See: https://github.com/github/linguist/pull/3880#issuecomment-340319500

* Combine patterns for disambiguating Perl
2017-11-17 21:25:56 +11:00