Commit Graph

47 Commits

Author SHA1 Message Date
Paul Chaignon
270fa8f5d3 Merge pull request #2894 from pchaigno/fix-warnings
Fix warnings
2016-03-19 20:42:32 -06:00
Vicent Marti
41d438b47e repository: Do not attempt to scan large repos 2015-09-28 01:45:49 -07:00
Vicent Marti
b275b5d728 Soften memory pressure 2015-09-07 22:03:29 +02:00
Paul Chaignon
f98e6bdac7 Use proper format for symlinks, submodules and trees 2015-07-04 17:14:30 +02:00
Paul Chaignon
730be65514 Ignore symlinks in repository statistics 2015-02-28 16:08:16 +01:00
Adam Roben
6a86e8ea97 Add BlobHelper#include_in_language_stats?
This just extracts some logic from Repository#compute_stats and makes it
testable.
2015-02-13 14:27:20 -05: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
b2ee2cc7b8 Detect all markup languages when computing language statistics
Originally, only "programming" languages were included in repository
language statistics. In 33ebee0f6a we
started detecting a few selected "markup" languages as well. We didn't
include all "markup" languages because at the time formats like Markdown
and AsciiDoc were labeled as "markup" languages, and we thought that
including those prose (i.e., non-code) languages in repository
statistics on github.com was misleading for repositories that are
largely about code but also contain a lot of documentation (e.g.,
rails/rails).

This hand-picked set of whitelisted "markup" languages can cause strange
categorization for some repositories. For example, it includes CSS (and
some variants) but not HTML. This results in repositories that contain
the source code for a static website being classified as either a
JavaScript (programming) or CSS (markup) repository, with no mention of
HTML anywhere.

Fast-forward to today, and prose languages are no longer "markup"
languages; they're now "prose" languages. So now we can include all
"markup" languages in repository language statistics without worrying
about undesirable effects for documentation-heavy repositories.
2015-02-10 13:39:42 -05:00
Arfon Smith
e87b89ab5b Removing todo 2014-10-13 18:52:27 -05:00
Arfon Smith
5cc053694a Remove pry 2014-10-13 16:38:51 -05:00
Arfon Smith
653314448c Bust that cache 2014-10-13 16:37:46 -05:00
Brandon Keepers
2b411aad90 Extract #read_index for tests 2014-09-29 15:04:48 -04:00
Brandon Keepers
b160a39678 Remove linguist_* prefix from vendored? and generated? 2014-09-29 13:48:40 -04:00
Arfon Smith
f87436d499 Adding linguist_vendored? and linguist_generated? to include overrides from .gitattributes 2014-09-24 19:57:30 -05:00
Vicent Marti
3d39e842ec Load Git Attributes for Linguist-specific overrides 2014-09-11 13:51:07 +02:00
Vicent Marti
d9be472ccb Skip submodules when diffing 2014-06-27 16:41:23 +02:00
Vicent Marti
bc34345a56 Fix the linguist binary 2014-06-26 13:03:30 +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
463f48f04f Mode must always be a String 2014-06-24 17:41:16 +02:00
Vicent Marti
cd58a30c7c Only cache strings, thanks 2014-06-24 17:41:16 +02:00
Vicent Marti
c4260ae681 Use Rugged when computing Repository stats 2014-06-24 17:41:16 +02:00
Ted Nyman
cdf6fb4a22 Initialize breakdown hash 2013-12-29 02:55:17 -08:00
Ted Nyman
bbf0e65c74 No need for the extra check 2013-12-28 20:09:54 -08:00
Ted Nyman
e660442e2e Add support for stats breakdown by file per repo 2013-12-28 19:22:13 -08:00
Ted Nyman
96e8a5d2cc Start detecting CSS 2013-07-30 13:30:39 -07: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
79be8b8c67 Set unused var to _ 2012-07-20 15:07:19 -05:00
Aman Gupta
4b9a1c297b bail fast on file extensions we recognize as binary 2011-11-23 00:32:14 -08:00
Joshua Peek
8f46cd0748 Try to classify language types 2011-07-05 20:48:06 -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
Carlos Galdino
176aad0259 fixing typo 2011-06-27 20:47:44 -03:00
Joshua Peek
bb7722d43a Use language group for computing repo stats 2011-06-22 10:42:18 -05:00
Joshua Peek
69f4c9cc6e Rename major to common 2011-06-22 10:37:20 -05:00
Joshua Peek
876265e8f3 Return nil if no Language if found 2011-06-18 21:49:02 -05:00
Joshua Peek
bcbb24e928 Overview of Repository 2011-06-14 00:05:21 -05:00
Joshua Peek
3d7c9ab1ed Raise an error if paths isn't an array or hash 2011-05-27 12:11:48 -05:00
Joshua Peek
2e1cac5676 Accept both Arrays and Hashs 2011-05-27 11:28:43 -05:00
Joshua Peek
a00013a077 Change FileBlob to accept a base path 2011-05-25 13:12:01 -05:00
Joshua Peek
5a780fbdc1 Add FileBlob 2011-05-25 12:52:12 -05:00
Joshua Peek
3ea66af178 Document Repository 2011-05-25 10:39:05 -05:00
Joshua Peek
b9d1e86eac Compute stats once 2011-05-21 21:17:15 -05:00
Joshua Peek
bcd90d2746 Exclude vendored and generated blobs 2011-05-21 21:11:56 -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
Joshua Peek
d98ebd4570 Include all common languages 2011-05-21 20:09:56 -05:00
Joshua Peek
b00cbd8446 Add Repository 2011-05-20 16:58:41 -05:00