33 Commits

Author SHA1 Message Date
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
Paul Chaignon
270fa8f5d3 Merge pull request #2894 from pchaigno/fix-warnings
Fix warnings
2016-03-19 20:42:32 -06:00
Arfon Smith
580cfce7fb Adding support for generated overrides 2015-09-03 14:39:27 +01:00
Adam Roben
066052ddd2 Exclude documentation files from language statistics
Documentation is an important part of a software project but is not
generally thought of as part of the code for that project. Repository
language statistics are used to quantify the project's code, so it makes
sense to exclude documentation from those computations.

Documentation files are recognized similarly to vendored files.
lib/linguist/documentation.yml contains regular expressions to match
common names for documentation files. A new linguist-documentation Git
attribute can be used to override those conventions.
2015-02-12 10:20:47 -05:00
Adam Roben
65296e86a3 Switch to Minitest::Test instead of Test::Unit::TestCase
This gives us a consistent test framework across all Ruby versions which
should help avoid errors that are only found when CI runs the tests on
different Rubies. (And this fixes an immediate bug where there's no
`skip` method in the version of test-unit we're currently using only on
Ruby 2.2.)
2014-12-31 15:26:26 -05:00
Brandon Keepers
aa7ab2065b Add test helper to make test env consistent 2014-11-18 16:46:09 -05:00
Arfon Smith
7aabc6a5ad A different approach 2014-10-13 17:01:53 -05:00
Arfon Smith
653314448c Bust that cache 2014-10-13 16:37:46 -05:00
Arfon Smith
332d97b57f Removing generated override for now. 2014-10-10 15:32:08 -05:00
Arfon Smith
d1d5c61df5 Updating ref for gitattribute testing 2014-09-29 16:27:20 -05:00
Arfon Smith
0cd7d85ec4 Using .gitattributes from test branch 2014-09-29 15:10:01 -05:00
Brandon Keepers
2b411aad90 Extract #read_index for tests 2014-09-29 15:04:48 -04:00
Brandon Keepers
1c6483a499 Simplify boolean attribute handling 2014-09-29 14:13:44 -04:00
Brandon Keepers
b160a39678 Remove linguist_* prefix from vendored? and generated? 2014-09-29 13:48:40 -04:00
Arfon Smith
5284608942 Stubbing git attributes (for now) 2014-09-25 13:48:03 -05:00
Arfon Smith
3ff1e38f6c Adding support for overriding configurations in vendor.yml and generated? 2014-09-25 12:50:42 -05:00
Arfon Smith
f87436d499 Adding linguist_vendored? and linguist_generated? to include overrides from .gitattributes 2014-09-24 19:57:30 -05:00
Arfon Smith
0e86ab9044 Version beta bump and some notes 2014-09-11 15:05:36 -05:00
Vicent Marti
3d39e842ec Load Git Attributes for Linguist-specific overrides 2014-09-11 13:51:07 +02:00
Vicent Marti
d206131df0 Hardcode OIDs for test 2014-06-27 13:51:37 +02:00
Vicent Marti
659d27cae5 DOCS 2014-06-26 12:54:08 +02:00
Vicent Marti
1fd59361b5 Proper incremental diffing 2014-06-25 20:26:44 +02:00
Vicent Marti
c4260ae681 Use Rugged when computing Repository stats 2014-06-24 17:41:16 +02:00
Ted Nyman
b498d51889 Add another breakdown_by_file assertion 2013-12-28 19:45:40 -08:00
Ted Nyman
001068ec75 Add test for language breakdown 2013-12-28 19:29:55 -08:00
Simon Hafner
b954d22eba Override for binary mime type based on languages.yml
If the extension already exists in languages.yml, it's probably not a
binary, but code.
2012-09-13 14:55:31 -05:00
Joshua Peek
5521dd08a0 Move test fixtures to samples/ 2012-06-22 10:09:24 -05:00
Joshua Peek
8a9d8a15af Building an army 2012-06-08 15:46:39 -05:00
Joshua Peek
074a77e649 Allow any enum to be passed to Repository for stat collecting
Fixes #28
2011-07-02 20:54:05 -05:00
Joshua Peek
aeef1d8f33 JS is minified if its average line length is greater than 100c
Fixes #27
2011-07-02 20:28:42 -05:00
Joshua Peek
5a780fbdc1 Add FileBlob 2011-05-25 12:52:12 -05:00
Joshua Peek
6f1f71ae23 Index by language object 2011-05-21 20:58:54 -05:00
Joshua Peek
c9a20c03b4 Add basic repository tests 2011-05-21 20:51:51 -05:00