Each strategy takes as candidates the language outputted by the
previous strategy if any. This was already the case for the
Classifier and Heuristic strategies as these couldn't generate new
candidate languages (as opposed to the Modeline, Filename, Shebang,
and Extension strategies).
In practice, this signifies that if, for example, the Shebang
strategy finds two possible languages for a given file (as is
currently possible with the perl interpreter), the next strategy, the
Extension strategy, will use this information and further reduce the
set of possible language.
Currently, without this commit, the Extension strategy would discard
the results from the previous strategy and start anew, possibly
returning a different language from those returned by the Shebang
strategy.
* Licensed needs a full path now
* Add docker installed/running guard
* Docker is required for adding/replacing grammars
* Use more elegant method
Hat-tip to @Alhadis 🎩
* Mainly fixing problems with Perl heuristics
And also adding a little bit of text to the README file to help with local use and test.
* Adds new sample
* Adds a couple of samples more, not represented before
* Moves installation intructions to CONTRIBUTING.md
Refs #2309 and also changes github.com to an uniform capitalization.
* Correcting error. Great job, CI
* Moving another file
* Adds samples and new checks for perl/perl6
* Stupid mistake
* Changing regex for perl5 vs perl6
Initial suggestion by @pchaigno, slightly changed to eliminate false positives such as "classes" or "modules" at the beginning of a line in the =pod
BTW, it would be interesting to just eliminate these areas for language detection.
* Eliminates Rexfile from Perl6
And adds .pod6
* Followup to #2709
I just found I had this sitting here, so I might as well follow
instructions to fix it.
* Adds example for pod6
* Eliminates .pod because it's its own language
* Removes bad directory
* Reverting changes that were already there
* Restored CONTRIBUTING.md from head
I see installation of cmake is advised in README.md
* Eliminates `.pod6`
To leave way for #3366 or succeeding PRs.
* Removed by request, since we're no longer adding this extension
* Sorting by alphabetical order filenames
* Moved from sample to test fixtures
* Detect Maven wrapper "mvnw"
* Fix build, filenames must be sorted in the "filenames" section of languages.yml, filenames cannot be grouped by topic
* Remove `mvnw` file from languages/Shell/filenames according to @Alhadis recommendation as we are sure that `mvnw` always starts with the shebang `#!/bin/sh`.
* Remove space chars added by mistake
* Register `cperl` as an alias of Perl 5
Emacs ships with an enhanced major-mode for editing Perl with embedded C
sections (called `cperl-mode`). This commit enables Linguist to identify
Perl files containing cperl modelines.
* Add `cperl` to list of Perl 5 interpreters
* Update licensee version
This pulls in Licensed 0.10.0 too.
* Use a full path to the grammars
Licensed now enforces this as it's easier then guessing.
* Ensure full path
* Use new path for FSProject
* Starting to adjust tests
* require licensee again
* Fix grammar tests
* verify -> status
* whitelist -> allowed
* explicitly set cache_path in configuration
default for licensed v1.0 changed from `vendor/licenses` to `.licenses`
* load configuration from file location
default configuration file location changed from `vendor/licenses/config.yml` to `.licensed.yml`
* update gemspec for licensed 1.0.0
* Remove unused license hash
* enable syntax highlighting for .jinja2 ext
This is a commonly used jinja (2!) extension
* add sample jinja2 file
* move jinja to django samples dir
* added a link to the jinja docs in the sample file
* change sample jinja2 file to a one that exists on GH
* * add CoNLL-U format
- add to languages.yml
- add textmate grammar
- add to vendor/README
- add to grammars.yml
- add samples
* rm other extensions as I couldn't find properly licensed examples of them in the wild
* substitutesamples for something with appropriate license
* update grammar submodule so it finds the LICENSE
* add license to grammar
* * conllu
- readd other extensions
- abridge samples and a new one
- update grammar submodule: correct extension of grammar file
* rm .conllx extension
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.
* 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
* 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
* 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