Nov
DEC
Jan
06
2019
2020
2021
About this capture
Organization:
Internet Archive
Focused crawls are collections of frequently-updated webcrawl data from narrow (as opposed to broad or wide) web crawls, often focused on a single domain or subdomain.
T h e W a y b a c k M a c h i n e - h t t p : / / w e b . a r c h i v e . o r g / w e b / 2 0 2 0 1 2 0 6 0 5 3 8 3 0 / h t t p s : / / g i t h u b . c o m / g i t h u b / l i n g u i s t
S k i p t o c o n t e n t
/ ; r e f _ c t a : S i g n u p ; r e f _ l o c : h e a d e r l o g g e d o u t " >
S i g n up
●
F e a t u r e s →
● C o d e r e v i e w
● P r o j e c t m a n a g e m e n t
● I n t e g r a t i o n s
● A c t i o n s
● P a c k a g e s
● S e c u r i t y
● T e a m m a n a g e m e n t
● H o s t i n g
● M o b i l e
● C u s t o m e r s t o r i e s →
● S e c u r i t y →
●
●
●
● E x p l o r e G i t H u b →
L e a r n & c o n t r i b u t e
● T o p i c s
● C o l l e c t i o n s
● T r e n d i n g
● L e a r n i n g L a b
● O p e n s o u r c e g u i d e s
C o n n e c t w i t h o t h e r s
● E v e n t s
● C o m m u n i t y f o r u m
● G i t H u b E d u c a t i o n
● G i t H u b S t a r s p r o g r a m
●
●
P l a n s →
● C o m p a r e p l a n s
● C o n t a c t S a l e s
● N o n p r o f i t →
● E d u c a t i o n →
In this repository
All GitHub
↵
Jump to
↵
No suggested jump to results
{ { m e s s a g e } }
●
W a t c h
3 6 7
●
S t a r
8 . 3 k
●
F o r k
3 k
L a n g u a g e S a v a n t . I f y o u r r e p o s i t o r y ' s l a n g u a g e i s b e i n g r e p o r t e d i n c o r r e c t l y , s e n d u s a p u l l r e q u e s t !
M I T L i c e n s e
8 . 3 k
s t a r s
3 k
f o r k s
S t a r
W a t c h
●
C o d e
●
I s s u e s
41
●
P u l l r e q u e s t s
28
●
A c t i o n s
●
S e c u r i t y
●
I n s i g h t s
M o r e
●
C o d e
●
I s s u e s
●
P u l l r e q u e s t s
●
A c t i o n s
●
S e c u r i t y
●
I n s i g h t s
D i s m i s s
J o i n G i t H u b t o d a y
G i t H u b i s h o m e t o o v e r 5 0 m i l l i o n d e v e l o p e r s w o r k i n g t o g e t h e r t o h o s t a n d r e v i e w c o d e , m a n a g e p r o j e c t s , a n d b u i l d s o f t w a r e t o g e t h e r .
S i g n u p
G i t H u b i s w h e r e t h e w o r l d b u i l d s s o f t w a r e
M i l l i o n s o f d e v e l o p e r s a n d c o m p a n i e s b u i l d , s h i p , a n d m a i n t a i n t h e i r s o f t w a r e o n G i t H u b — t h e l a r g e s t a n d m o s t a d v a n c e d d e v e l o p m e n t p l a t f o r m i n t h e w o r l d .
S i g n u p f o r f r e e
D i s m i s s
8
b r a n c h e s
1 5 5
t a g s
G o t o f i l e
C o d e
C l o n e
U s e G i t o r c h e c k o u t w i t h S V N u s i n g t h e w e b U R L .
W o r k f a s t w i t h o u r o f f i c i a l C L I .
L e a r n m o r e .
●
O p e n w i t h G i t H u b D e s k t o p
●
D o w n l o a d Z I P
L a u n c h i n g G i t H u b D e s k t o p
I f n o t h i n g h a p p e n s , d o w n l o a d G i t H u b D e s k t o p a n d t r y a g a i n .
G o b a c k
L a u n c h i n g G i t H u b D e s k t o p
I f n o t h i n g h a p p e n s , d o w n l o a d G i t H u b D e s k t o p a n d t r y a g a i n .
G o b a c k
L a u n c h i n g X c o d e
I f n o t h i n g h a p p e n s , d o w n l o a d X c o d e a n d t r y a g a i n .
G o b a c k
L a u n c h i n g V i s u a l S t u d i o
I f n o t h i n g h a p p e n s , d o w n l o a d t h e G i t H u b e x t e n s i o n f o r V i s u a l S t u d i o a n d t r y a g a i n .
G o b a c k
L a t e s t c o m m i t
A l h a d i s
A d d s u p p o r t f o r G l y p h s p r o j e c t s ( # 5 0 9 7 )
…
6 3 3 d 1 9 6
D e c 2 , 2 0 2 0
A d d s u p p o r t f o r G l y p h s p r o j e c t s ( # 5 0 9 7 )
6 3 3 d 1 9 6
G i t s t a t s
●
6 , 1 5 2
c o m m i t s
F i l e s
P e r m a l i n k
F a i l e d t o l o a d l a t e s t c o m m i t i n f o r m a t i o n .
T y p e
N a m e
L a t e s t c o m m i t m e s s a g e
C o m m i t t i m e
. g i t h u b
U s e r u b y / s e t u p - r u b y A c t i o n f o r C I W o r k f l o w ( # 5 1 0 0 )
D e c 2 , 2 0 2 0
b i n
A d d J S O N o u t p u t f o r s i n g l e f i l e c l a s s i f i c a t i o n ( # 4 6 6 4 )
O c t 2 4 , 2 0 1 9
e x t / l i n g u i s t
T o k e n i z e r : a v o i d i n t e r m e d i a t e s t r i n g c o p i e s ( # 5 0 6 5 )
O c t 2 6 , 2 0 2 0
l i b
A d d s u p p o r t f o r G l y p h s p r o j e c t s ( # 5 0 9 7 )
D e c 2 , 2 0 2 0
s a m p l e s
A d d s u p p o r t f o r G l y p h s p r o j e c t s ( # 5 0 9 7 )
D e c 2 , 2 0 2 0
s c r i p t
U s e r u b y / s e t u p - r u b y A c t i o n f o r C I W o r k f l o w ( # 5 1 0 0 )
D e c 2 , 2 0 2 0
t e s t
" c l a s s = " l i n k - g r a y " h r e f = " / w e b / 2 0 2 0 1 2 0 6 0 5 3 8 3 0 / h t t p s : / / g i t h u b . c o m / g i t h u b / l i n g u i s t / c o m m i t / 5 d a 9 1 5 5 5 3 2 9 a 1 3 7 1 a 6 0 2 f 1 0 a 9 7 1 9 4 3 9 2 1 9 d 2 8 0 d e " > M o v e g e n e r i c e x t e n s i o n s l i s t t o a d e d i c a t e d f i l e ( # 5 0 7 0 " c l a s s = " l i n k - g r a y " h r e f = " / w e b / 2 0 2 0 1 2 0 6 0 5 3 8 3 0 / h t t p s : / / g i t h u b . c o m / g i t h u b / l i n g u i s t / c o m m i t / 5 d a 9 1 5 5 5 3 2 9 a 1 3 7 1 a 6 0 2 f 1 0 a 9 7 1 9 4 3 9 2 1 9 d 2 8 0 d e " > )
N o v 4 , 2 0 2 0
t o o l s / g r a m m a r s
I g n o r e f i l e s i n s r c d i r e c t o r i e s o f g r a m m a r s ( # 5 0 8 8 )
N o v 9 , 2 0 2 0
v e n d o r
" c l a s s = " l i n k - g r a y " h r e f = " / w e b / 2 0 2 0 1 2 0 6 0 5 3 8 3 0 / h t t p s : / / g i t h u b . c o m / g i t h u b / l i n g u i s t / c o m m i t / 2 3 4 0 9 e 0 0 f 3 0 a 4 a d 2 f 9 d d d 7 5 3 d 4 4 f 1 f 8 e a 1 3 9 7 8 c e " > A d d s u p p o r t f o r B r o w s e r s l i s t ( # 5 0 9 9 " c l a s s = " l i n k - g r a y " h r e f = " / w e b / 2 0 2 0 1 2 0 6 0 5 3 8 3 0 / h t t p s : / / g i t h u b . c o m / g i t h u b / l i n g u i s t / c o m m i t / 2 3 4 0 9 e 0 0 f 3 0 a 4 a d 2 f 9 d d d 7 5 3 d 4 4 f 1 f 8 e a 1 3 9 7 8 c e " > )
D e c 2 , 2 0 2 0
. d o c k e r i g n o r e
C o - a u t h o r e d - b y : C o l i n S e y m o u r " c l a s s = " l i n k - g r a y " h r e f = " / w e b / 2 0 2 0 1 2 0 6 0 5 3 8 3 0 / h t t p s : / / g i t h u b . c o m / g i t h u b / l i n g u i s t / c o m m i t / 8 0 8 3 c b 5 a 8 9 c e e 2 d 9 9 f 5 a 9 8 8 f 1 6 5 9 9 4 d 0 2 4 3 f 0 d 1 e " > A d d D o c k e r f i l e ( # 4 6 8 7
C o - a u t h o r e d - b y : C o l i n S e y m o u r " c l a s s = " l i n k - g r a y " h r e f = " / w e b / 2 0 2 0 1 2 0 6 0 5 3 8 3 0 / h t t p s : / / g i t h u b . c o m / g i t h u b / l i n g u i s t / c o m m i t / 8 0 8 3 c b 5 a 8 9 c e e 2 d 9 9 f 5 a 9 8 8 f 1 6 5 9 9 4 d 0 2 4 3 f 0 d 1 e " > )
S e p 8 , 2 0 2 0
. e d i t o r c o n f i g
A d d E d i t o r C o n f i g f i l e a n d l a n g u a g e s u b - e n t r y ( # 4 4 2 1 )
M a r 2 , 2 0 1 9
. g i t i g n o r e
g i t c o n f i g g r a m m a r a l i a s
* A d d l i s t o f f i l e s t o i g n o r e a n d g r a m m a r s i n n o n s t d p a t h
* V a l i d a t e g r a m m a r s w i t h f i l e s i n n o n s t d p a t h
* I g n o r e k n o w n d u d s
* E a s y r e b u i l d a n d r u n g r a m m a r - c o m p i l e r l o c a l l y
* A l i a s s o u r c e . s m a r t y t o t e x t . h t m l . s m a r t y
* A l i a s t e x t . s l m t o t e x t . s l i m
s l m i s a j a v a s c r i p t p o r t o f S l i m a s p e r h t t p s : / / g i t h u b . c o m / s l i m - t e m p l a t e / s l i m / i s s u e s / 5 2 6
* A l i a s t e x t . p u g t o t e x t . j a d e
J a d e w a s r e n a m e d t o p u g b u t t h e g r a m m a r s t i l l r e f e r s t o i t a s J a d e
* I g n o r e f i l e s p r o d u c e d b y t h e g r a m m a r c o m p i l e r
* U s e a m a p [ s t r i n g ] b o o l i n s t e a d o f a l o o p
* D o n ' t i g n o r e e r r " c l a s s = " l i n k - g r a y " h r e f = " / w e b / 2 0 2 0 1 2 0 6 0 5 3 8 3 0 / h t t p s : / / g i t h u b . c o m / g i t h u b / l i n g u i s t / c o m m i t / 5 f f 2 7 2 d 4 6 e 5 1 9 9 1 4 e d 8 2 3 d 2 c c 6 f 6 7 0 b 2 0 5 a 3 e a 5 d " > G r a m m a r c o m p i l e r t w e a k s a n d i m p r o v e m e n t s ( # 4 4 4 4 g i t c o n f i g g r a m m a r a l i a s
* A d d l i s t o f f i l e s t o i g n o r e a n d g r a m m a r s i n n o n s t d p a t h
* V a l i d a t e g r a m m a r s w i t h f i l e s i n n o n s t d p a t h
* I g n o r e k n o w n d u d s
* E a s y r e b u i l d a n d r u n g r a m m a r - c o m p i l e r l o c a l l y
* A l i a s s o u r c e . s m a r t y t o t e x t . h t m l . s m a r t y
* A l i a s t e x t . s l m t o t e x t . s l i m
s l m i s a j a v a s c r i p t p o r t o f S l i m a s p e r h t t p s : / / g i t h u b . c o m / s l i m - t e m p l a t e / s l i m / i s s u e s / 5 2 6
* A l i a s t e x t . p u g t o t e x t . j a d e
J a d e w a s r e n a m e d t o p u g b u t t h e g r a m m a r s t i l l r e f e r s t o i t a s J a d e
* I g n o r e f i l e s p r o d u c e d b y t h e g r a m m a r c o m p i l e r
* U s e a m a p [ s t r i n g ] b o o l i n s t e a d o f a l o o p
* D o n ' t i g n o r e e r r " c l a s s = " l i n k - g r a y " h r e f = " / w e b / 2 0 2 0 1 2 0 6 0 5 3 8 3 0 / h t t p s : / / g i t h u b . c o m / g i t h u b / l i n g u i s t / c o m m i t / 5 f f 2 7 2 d 4 6 e 5 1 9 9 1 4 e d 8 2 3 d 2 c c 6 f 6 7 0 b 2 0 5 a 3 e a 5 d " > )
M a r 5 , 2 0 1 9
. g i t m o d u l e s
" c l a s s = " l i n k - g r a y " h r e f = " / w e b / 2 0 2 0 1 2 0 6 0 5 3 8 3 0 / h t t p s : / / g i t h u b . c o m / g i t h u b / l i n g u i s t / c o m m i t / 2 3 4 0 9 e 0 0 f 3 0 a 4 a d 2 f 9 d d d 7 5 3 d 4 4 f 1 f 8 e a 1 3 9 7 8 c e " > A d d s u p p o r t f o r B r o w s e r s l i s t ( # 5 0 9 9 " c l a s s = " l i n k - g r a y " h r e f = " / w e b / 2 0 2 0 1 2 0 6 0 5 3 8 3 0 / h t t p s : / / g i t h u b . c o m / g i t h u b / l i n g u i s t / c o m m i t / 2 3 4 0 9 e 0 0 f 3 0 a 4 a d 2 f 9 d d d 7 5 3 d 4 4 f 1 f 8 e a 1 3 9 7 8 c e " > )
D e c 2 , 2 0 2 0
C O N T R I B U T I N G . m d
U p d a t e l i n k t o n e w G i t H u b d o c u m e n t a t i o n ( # 5 0 9 0 )
N o v 1 0 , 2 0 2 0
D o c k e r f i l e
C o - a u t h o r e d - b y : C o l i n S e y m o u r " c l a s s = " l i n k - g r a y " h r e f = " / w e b / 2 0 2 0 1 2 0 6 0 5 3 8 3 0 / h t t p s : / / g i t h u b . c o m / g i t h u b / l i n g u i s t / c o m m i t / 8 0 8 3 c b 5 a 8 9 c e e 2 d 9 9 f 5 a 9 8 8 f 1 6 5 9 9 4 d 0 2 4 3 f 0 d 1 e " > A d d D o c k e r f i l e ( # 4 6 8 7
C o - a u t h o r e d - b y : C o l i n S e y m o u r " c l a s s = " l i n k - g r a y " h r e f = " / w e b / 2 0 2 0 1 2 0 6 0 5 3 8 3 0 / h t t p s : / / g i t h u b . c o m / g i t h u b / l i n g u i s t / c o m m i t / 8 0 8 3 c b 5 a 8 9 c e e 2 d 9 9 f 5 a 9 8 8 f 1 6 5 9 9 4 d 0 2 4 3 f 0 d 1 e " > )
S e p 8 , 2 0 2 0
G e m f i l e
B y e b u g r e q u i r e s R u b y 2 . 2 ( # 3 7 9 0 )
A u g 2 4 , 2 0 1 7
L I C E N S E
U p d a t e L I C E N S E
F e b 1 5 , 2 0 1 7
R E A D M E . m d
U p d a t e l i n k t o n e w G i t H u b d o c u m e n t a t i o n ( # 5 0 9 0 )
N o v 1 0 , 2 0 2 0
R a k e f i l e
R e l e a s e v 7 . 1 1 . 0 ( # 4 9 9 3 )
S e p 7 , 2 0 2 0
g i t h u b - l i n g u i s t . g e m s p e c
A b o l i s h r e s t r i c t i o n s g o v e r n i n g c o l o u r c h o i c e s ( # 4 9 7 8 )
S e p 1 , 2 0 2 0
g r a m m a r s . y m l
" c l a s s = " l i n k - g r a y " h r e f = " / w e b / 2 0 2 0 1 2 0 6 0 5 3 8 3 0 / h t t p s : / / g i t h u b . c o m / g i t h u b / l i n g u i s t / c o m m i t / 2 3 4 0 9 e 0 0 f 3 0 a 4 a d 2 f 9 d d d 7 5 3 d 4 4 f 1 f 8 e a 1 3 9 7 8 c e " > A d d s u p p o r t f o r B r o w s e r s l i s t ( # 5 0 9 9 " c l a s s = " l i n k - g r a y " h r e f = " / w e b / 2 0 2 0 1 2 0 6 0 5 3 8 3 0 / h t t p s : / / g i t h u b . c o m / g i t h u b / l i n g u i s t / c o m m i t / 2 3 4 0 9 e 0 0 f 3 0 a 4 a d 2 f 9 d d d 7 5 3 d 4 4 f 1 f 8 e a 1 3 9 7 8 c e " > )
D e c 2 , 2 0 2 0
V i e w c o d e
R E A D M E . m d
L i n g u i s t
T h i s l i b r a r y i s u s e d o n G i t H u b . c o m t o d e t e c t b l o b l a n g u a g e s , i g n o r e b i n a r y o r v e n d o r e d f i l e s , s u p p r e s s g e n e r a t e d f i l e s i n d i f f s , a n d g e n e r a t e l a n g u a g e b r e a k d o w n g r a p h s .
S e e T r o u b l e s h o o t i n g a n d C O N T R I B U T I N G . m d b e f o r e f i l i n g a n i s s u e o r c r e a t i n g a p u l l r e q u e s t .
H o w L i n g u i s t w o r k s
L i n g u i s t t a k e s t h e l i s t o f l a n g u a g e s i t k n o w s f r o m l a n g u a g e s . y m l a n d u s e s a n u m b e r o f m e t h o d s t o t r y a n d d e t e r m i n e t h e l a n g u a g e u s e d b y e a c h f i l e , a n d t h e o v e r a l l r e p o s i t o r y b r e a k d o w n .
L i n g u i s t s t a r t s b y g o i n g t h r o u g h a l l t h e f i l e s i n a r e p o s i t o r y a n d e x c l u d e s a l l f i l e s t h a t i t d e t e r m i n e s t o b e b i n a r y d a t a , v e n d o r e d c o d e , g e n e r a t e d c o d e , d o c u m e n t a t i o n , o r a r e d e f i n e d a s d a t a ( e . g . S Q L ) o r p r o s e ( e . g . M a r k d o w n ) l a n g u a g e s , w h i l s t t a k i n g i n t o a c c o u n t a n y o v e r r i d e s .
I f a n e x p l i c i t l a n g u a g e o v e r r i d e h a s b e e n u s e d , t h a t l a n g u a g e i s u s e d f o r t h e m a t c h i n g f i l e s .
T h e l a n g u a g e o f e a c h r e m a i n i n g f i l e i s t h e n d e t e r m i n e d u s i n g t h e f o l l o w i n g s t r a t e g i e s , i n o r d e r , w i t h e a c h s t e p e i t h e r i d e n t i f y i n g t h e p r e c i s e l a n g u a g e o r r e d u c i n g t h e n u m b e r o f l i k e l y l a n g u a g e s p a s s e d d o w n t o t h e n e x t s t r a t e g y :
● V i m o r E m a c s m o d e l i n e ,
● c o m m o n l y u s e d f i l e n a m e ,
● s h e l l s h e b a n g ,
● f i l e e x t e n s i o n ,
● X M L h e a d e r ,
● m a n p a g e s e c t i o n ,
● h e u r i s t i c s ,
● n a ï v e B a y e s i a n c l a s s i f i c a t i o n
T h e r e s u l t o f t h i s a n a l y s i s i s u s e d t o p r o d u c e t h e l a n g u a g e s t a t s b a r w h i c h d i s p l a y s t h e l a n g u a g e s p e r c e n t a g e s f o r t h e f i l e s i n t h e r e p o s i t o r y .
T h e p e r c e n t a g e s a r e c a l c u l a t e d b a s e d o n t h e b y t e s o f c o d e f o r e a c h l a n g u a g e a s r e p o r t e d b y t h e L i s t L a n g u a g e s A P I .
H o w L i n g u i s t w o r k s o n G i t H u b . c o m
W h e n y o u p u s h c h a n g e s t o a r e p o s i t o r y o n G i t H u b . c o m , a l o w p r i o r i t y b a c k g r o u n d j o b i s e n q u e u e d t o a n a l y z e y o u r r e p o s i t o r y a s e x p l a i n e d a b o v e .
T h e r e s u l t s o f t h i s a n a l y s i s a r e c a c h e d f o r t h e l i f e t i m e o f y o u r r e p o s i t o r y a n d a r e o n l y u p d a t e d w h e n t h e r e p o s i t o r y i s u p d a t e d .
A s t h i s a n a l y s i s i s p e r f o r m e d b y a l o w p r i o r i t y b a c k g r o u n d j o b , i t c a n t a k e a w h i l e , p a r t i c u l a r l y d u r i n g b u s y p e r i o d s , f o r y o u r l a n g u a g e s t a t i s t i c s b a r t o r e f l e c t y o u r c h a n g e s .
U s a g e
I n s t a l l a t i o n
I n s t a l l t h e g e m :
gem install github-linguist
D e p e n d e n c i e s
L i n g u i s t u s e s c h a r l o c k _ h o l m e s f o r c h a r a c t e r e n c o d i n g a n d r u g g e d f o r l i b g i t 2 b i n d i n g s f o r R u b y .
T h e s e c o m p o n e n t s h a v e t h e i r o w n d e p e n d e n c i e s .
(一) c h a r l o c k _ h o l m e s
● c m a k e
● p k g - c o n f i g
● I C U
● z l i b
(二) r u g g e d
● l i b c u r l
● O p e n S S L
Y o u m a y n e e d t o i n s t a l l m i s s i n g d e p e n d e n c i e s b e f o r e y o u c a n i n s t a l l L i n g u i s t .
F o r e x a m p l e , o n m a c O S w i t h H o m e b r e w :
brew install cmake pkg-config icu4c
O n U b u n t u :
sudo apt-get install cmake pkg-config libicu-dev zlib1g-dev libcurl4-openssl-dev libssl-dev ruby-dev
A p p l i c a t i o n u s a g e
L i n g u i s t c a n b e u s e d i n y o u r a p p l i c a t i o n a s f o l l o w s :
require 'rugged'
require 'linguist'
repo = Rugged ::Repository . new ( '.' )
project = Linguist ::Repository . new ( repo , repo . head . target_id )
project . language #=> "Ruby"
project . languages #=> { "Ruby" => 119387 }
C o m m a n d l i n e u s a g e
G i t R e p o s i t o r y
A r e p o s i t o r y ' s l a n g u a g e s s t a t s c a n a l s o b e a s s e s s e d f r o m t h e c o m m a n d l i n e u s i n g t h e g i t h u b - l i n g u i s t e x e c u t a b l e .
W i t h o u t a n y o p t i o n s , g i t h u b - l i n g u i s t w i l l o u t p u t t h e b r e a k d o w n t h a t c o r r e l a t e s t o w h a t i s s h o w n i n t h e l a n g u a g e s t a t s b a r .
T h e - - b r e a k d o w n f l a g w i l l a d d i t i o n a l l y s h o w t h e b r e a k d o w n o f f i l e s b y l a n g u a g e .
cd /path-to-repository/
github-linguist
Y o u c a n t r y r u n n i n g g i t h u b - l i n g u i s t o n t h e r o o t d i r e c t o r y i n t h i s r e p o s i t o r y i t s e l f :
$ github-linguist --breakdown
68.57% Ruby
22.90% C
6.93% Go
1.21% Lex
0.39% Shell
Ruby:
Gemfile
Rakefile
bin/git-linguist
bin/github-linguist
ext/linguist/extconf.rb
github-linguist.gemspec
lib/linguist.rb
…
S i n g l e f i l e
A l t e r n a t i v e l y y o u c a n f i n d s t a t s f o r a s i n g l e f i l e u s i n g t h e g i t h u b - l i n g u i s t e x e c u t a b l e .
Y o u c a n t r y r u n n i n g g i t h u b - l i n g u i s t o n f i l e s i n t h i s r e p o s i t o r y i t s e l f :
$ github-linguist grammars.yml
grammars.yml: 884 lines (884 sloc)
type: Text
mime type: text/x-yaml
language: YAML
D o c k e r
I f y o u h a v e D o c k e r i n s t a l l e d y o u c a n b u i l d a n i m a g e a n d r u n L i n g u i s t w i t h i n a c o n t a i n e r :
$ docker build -t linguist .
$ docker run --rm -v $( pwd) :$( pwd) -w $( pwd) -t linguist
68.57% Ruby
22.90% C
6.93% Go
1.21% Lex
0.39% Shell
$ docker run --rm -v $( pwd) :$( pwd) -w $( pwd) -t linguist github-linguist --breakdown
68.57% Ruby
22.90% C
6.93% Go
1.21% Lex
0.39% Shell
Ruby:
Gemfile
Rakefile
bin/git-linguist
bin/github-linguist
ext/linguist/extconf.rb
github-linguist.gemspec
lib/linguist.rb
…
T r o u b l e s h o o t i n g
M y r e p o s i t o r y i s d e t e c t e d a s t h e w r o n g l a n g u a g e
I f t h e l a n g u a g e s t a t s b a r i s r e p o r t i n g a l a n g u a g e t h a t y o u d o n ' t e x p e c t :
(一) C l i c k o n t h e n a m e o f t h e l a n g u a g e i n t h e s t a t s b a r t o s e e a l i s t o f t h e f i l e s t h a t a r e i d e n t i f i e d a s t h a t l a n g u a g e .
K e e p i n m i n d t h i s p e r f o r m s a s e a r c h s o t h e c o d e s e a r c h r e s t r i c t i o n s m a y r e s u l t i n f i l e s i d e n t i f i e d i n t h e l a n g u a g e s t a t i s t i c s n o t a p p e a r i n g i n t h e s e a r c h r e s u l t s .
I n s t a l l i n g L i n g u i s t l o c a l l y a n d r u n n i n g i t f r o m t h e c o m m a n d l i n e w i l l g i v e y o u a c c u r a t e r e s u l t s .
(二) I f y o u s e e f i l e s t h a t y o u d i d n ' t w r i t e i n t h e s e a r c h r e s u l t s , c o n s i d e r m o v i n g t h e f i l e s i n t o o n e o f t h e p a t h s f o r v e n d o r e d c o d e , o r u s e t h e m a n u a l o v e r r i d e s f e a t u r e t o i g n o r e t h e m .
(三) I f t h e f i l e s a r e m i s c l a s s i f i e d , s e a r c h f o r o p e n i s s u e s t o s e e i f a n y o n e e l s e h a s a l r e a d y r e p o r t e d t h e i s s u e .
A n y i n f o r m a t i o n y o u c a n a d d , e s p e c i a l l y l i n k s t o p u b l i c r e p o s i t o r i e s , i s h e l p f u l .
Y o u c a n a l s o u s e t h e m a n u a l o v e r r i d e s f e a t u r e t o c o r r e c t l y c l a s s i f y t h e m i n y o u r r e p o s i t o r y .
(四) I f t h e r e a r e n o r e p o r t e d i s s u e s o f t h i s m i s c l a s s i f i c a t i o n , o p e n a n i s s u e a n d i n c l u d e a l i n k t o t h e r e p o s i t o r y o r a s a m p l e o f t h e c o d e t h a t i s b e i n g m i s c l a s s i f i e d .
K e e p i n m i n d t h a t t h e r e p o s i t o r y l a n g u a g e s t a t s a r e o n l y u p d a t e d w h e n y o u p u s h c h a n g e s , a n d t h e r e s u l t s a r e c a c h e d f o r t h e l i f e t i m e o f y o u r r e p o s i t o r y .
I f y o u h a v e n o t m a d e a n y c h a n g e s t o y o u r r e p o s i t o r y i n a w h i l e , y o u m a y f i n d p u s h i n g a n o t h e r c h a n g e w i l l c o r r e c t t h e s t a t s .
M y r e p o s i t o r y i s n ' t s h o w i n g m y l a n g u a g e
L i n g u i s t d o e s n o t c o n s i d e r v e n d o r e d c o d e , g e n e r a t e d c o d e , d o c u m e n t a t i o n , o r d a t a ( e . g . S Q L ) o r p r o s e ( e . g . M a r k d o w n ) l a n g u a g e s ( a s d e f i n e d b y t h e t y p e a t t r i b u t e i n l a n g u a g e s . y m l ) w h e n c a l c u l a t i n g t h e r e p o s i t o r y l a n g u a g e s t a t i s t i c s .
I f t h e l a n g u a g e s t a t i s t i c s b a r i s n o t s h o w i n g y o u r l a n g u a g e a t a l l , i t c o u l d b e f o r a f e w r e a s o n s :
(一) L i n g u i s t d o e s n ' t k n o w a b o u t y o u r l a n g u a g e .
(二) T h e e x t e n s i o n y o u h a v e c h o s e n i s n o t a s s o c i a t e d w i t h y o u r l a n g u a g e i n l a n g u a g e s . y m l .
(三) A l l t h e f i l e s i n y o u r r e p o s i t o r y f a l l i n t o o n e o f t h e c a t e g o r i e s l i s t e d a b o v e t h a t L i n g u i s t e x c l u d e s b y d e f a u l t .
I f L i n g u i s t d o e s n ' t k n o w a b o u t t h e l a n g u a g e o r t h e e x t e n s i o n y o u ' r e u s i n g , c o n s i d e r c o n t r i b u t i n g t o L i n g u i s t b y o p e n i n g a p u l l r e q u e s t t o a d d s u p p o r t f o r y o u r l a n g u a g e o r e x t e n s i o n .
F o r e v e r y t h i n g e l s e , y o u c a n u s e t h e m a n u a l o v e r r i d e s f e a t u r e t o t e l l L i n g u i s t t o i n c l u d e y o u r f i l e s i n t h e l a n g u a g e s t a t i s t i c s .
T h e r e ' s a p r o b l e m w i t h t h e s y n t a x h i g h l i g h t i n g o f a f i l e
L i n g u i s t d e t e c t s t h e l a n g u a g e o f a f i l e b u t t h e a c t u a l s y n t a x - h i g h l i g h t i n g i s p o w e r e d b y a s e t o f l a n g u a g e g r a m m a r s w h i c h a r e i n c l u d e d i n t h i s p r o j e c t a s a s e t o f s u b m o d u l e s a s l i s t e d h e r e .
I f y o u e x p e r i e n c e a n i s s u e w i t h t h e s y n t a x - h i g h l i g h t i n g o n G i t H u b , p l e a s e r e p o r t t h e i s s u e t o t h e u p s t r e a m g r a m m a r r e p o s i t o r y , n o t h e r e .
G r a m m a r s a r e u p d a t e d e v e r y t i m e w e b u i l d t h e L i n g u i s t g e m s o u p s t r e a m b u g f i x e s a r e a u t o m a t i c a l l y i n c o r p o r a t e d a s t h e y a r e f i x e d .
I g e t a n e r r o r w h e n u s i n g L i n g u i s t o n a d i r e c t o r y t h a t i s n o t a G i t r e p o s i t o r y
L i n g u i s t o n l y w o r k s o n G i t r e p o s i t o r i e s a n d i n d i v i d u a l f i l e s . I t s p r i m a r y u s e i s o n G i t H u b . c o m w h i c h u s e s b a r e
r e p o s i t o r i e s a n d t h u s c h a n g e s n e e d t o b e c o m m i t t e d a s i n d i v i d u a l f i l e s d o n ' t s h o w o n t h e f i l e s y s t e m .
A s a w o r k a r o u n d y o u c o u l d i n i t i a l i s e a t e m p o r a r y G i t r e p o s i t o r y i n y o u r d i r e c t o r y a s d e m o n s t r a t e d i n t h i s
s c r i p t .
A l t e r n a t i v e l y y o u c a n r u n L i n g u i s t o n i n d i v i d u a l f i l e s , s e e a b o v e .
O v e r r i d e s
L i n g u i s t s u p p o r t s a n u m b e r o f d i f f e r e n t c u s t o m o v e r r i d e s t r a t e g i e s f o r l a n g u a g e d e f i n i t i o n s a n d f i l e p a t h s .
U s i n g g i t a t t r i b u t e s
A d d a . g i t a t t r i b u t e s f i l e t o y o u r p r o j e c t a n d u s e s t a n d a r d g i t - s t y l e p a t h m a t c h e r s f o r t h e f i l e s y o u w a n t t o o v e r r i d e u s i n g t h e l i n g u i s t - d o c u m e n t a t i o n , l i n g u i s t - l a n g u a g e , l i n g u i s t - v e n d o r e d , l i n g u i s t - g e n e r a t e d a n d l i n g u i s t - d e t e c t a b l e a t t r i b u t e s .
. g i t a t t r i b u t e s w i l l b e u s e d t o d e t e r m i n e l a n g u a g e s t a t i s t i c s a n d w i l l b e u s e d t o s y n t a x h i g h l i g h t f i l e s .
Y o u c a n a l s o m a n u a l l y s e t s y n t a x h i g h l i g h t i n g u s i n g V i m o r E m a c s m o d e l i n e s .
W h e n t e s t i n g w i t h a l o c a l i n s t a l l a t i o n o f L i n g u i s t , t a k e n o t e t h a t t h e a d d e d a t t r i b u t e s w i l l n o t t a k e e f f e c t u n t i l t h e . g i t a t t r i b u t e s f i l e i s c o m m i t t e d t o y o u r r e p o s i t o r y .
F i l e a n d f o l d e r p a t h s i n s i d e . g i t a t t r i b u t e s a r e c a l c u l a t e d r e l a t i v e t o t h e p o s i t i o n o f t h e . g i t a t t r i b u t e s f i l e .
# Example of a `.gitattributes` file which reclassifies `.rb` files as Java:
* .rb linguist-language =Java
# Replace any whitespace in the language name with hyphens:
* .glyphs linguist-language =OpenStep-Property-List
V e n d o r e d c o d e
C h e c k i n g c o d e y o u d i d n ' t w r i t e , s u c h a s J a v a S c r i p t l i b r a r i e s , i n t o y o u r g i t r e p o i s a c o m m o n p r a c t i c e , b u t t h i s o f t e n i n f l a t e s y o u r p r o j e c t ' s l a n g u a g e s t a t s a n d m a y e v e n c a u s e y o u r p r o j e c t t o b e l a b e l e d a s a n o t h e r l a n g u a g e .
B y d e f a u l t , L i n g u i s t t r e a t s a l l o f t h e p a t h s d e f i n e d i n v e n d o r . y m l a s v e n d o r e d a n d t h e r e f o r e d o e s n ' t i n c l u d e t h e m i n t h e l a n g u a g e s t a t i s t i c s f o r a r e p o s i t o r y .
U s e t h e l i n g u i s t - v e n d o r e d a t t r i b u t e t o v e n d o r o r u n - v e n d o r p a t h s :
special-vendored-path /* linguist-vendored
jquery.js - linguist-vendored
D o c u m e n t a t i o n
J u s t l i k e v e n d o r e d f i l e s , L i n g u i s t e x c l u d e s d o c u m e n t a t i o n f i l e s f r o m y o u r p r o j e c t ' s l a n g u a g e s t a t s .
d o c u m e n t a t i o n . y m l l i s t s c o m m o n d o c u m e n t a t i o n p a t h s a n d e x c l u d e s t h e m f r o m t h e l a n g u a g e s t a t i s t i c s f o r y o u r r e p o s i t o r y .
U s e t h e l i n g u i s t - d o c u m e n t a t i o n a t t r i b u t e t o m a r k o r u n m a r k p a t h s a s d o c u m e n t a t i o n :
project-docs /* linguist-documentation
docs /formatter.rb - linguist-documentation
G e n e r a t e d c o d e
N o t a l l p l a i n t e x t f i l e s a r e t r u e s o u r c e f i l e s .
G e n e r a t e d f i l e s l i k e m i n i f i e d J a v a S c r i p t a n d c o m p i l e d C o f f e e S c r i p t c a n b e d e t e c t e d a n d e x c l u d e d f r o m l a n g u a g e s t a t s .
A s a n a d d e d b o n u s , u n l i k e v e n d o r e d a n d d o c u m e n t a t i o n f i l e s , t h e s e f i l e s a r e s u p p r e s s e d i n d i f f s .
g e n e r a t e d . r b l i s t s c o m m o n g e n e r a t e d p a t h s a n d e x c l u d e s t h e m f r o m t h e l a n g u a g e s t a t i s t i c s o f y o u r r e p o s i t o r y .
U s e t h e l i n g u i s t - g e n e r a t e d a t t r i b u t e t o m a r k o r u n m a r k p a t h s a s g e n e r a t e d .
Api.elm linguist-generated
D e t e c t a b l e
O n l y p r o g r a m m i n g l a n g u a g e s a r e i n c l u d e d i n t h e l a n g u a g e s t a t i s t i c s .
L a n g u a g e s o f a d i f f e r e n t t y p e ( a s d e f i n e d i n l a n g u a g e s . y m l ) a r e n o t " d e t e c t a b l e " c a u s i n g t h e m n o t t o b e i n c l u d e d i n t h e l a n g u a g e s t a t i s t i c s .
U s e t h e l i n g u i s t - d e t e c t a b l e a t t r i b u t e t o m a r k o r u n m a r k p a t h s a s d e t e c t a b l e :
* .kicad_pcb linguist-detectable
* .sch linguist-detectable
tools /export_bom.py - linguist-detectable
U s i n g E m a c s o r V i m m o d e l i n e s
I f y o u d o n o t w a n t t o u s e . g i t a t t r i b u t e s t o o v e r r i d e t h e s y n t a x h i g h l i g h t i n g u s e d o n G i t H u b . c o m , y o u c a n u s e V i m o r E m a c s s t y l e m o d e l i n e s t o s e t t h e l a n g u a g e f o r a s i n g l e f i l e .
M o d e l i n e s c a n b e p l a c e d a n y w h e r e w i t h i n a f i l e a n d a r e r e s p e c t e d w h e n d e t e r m i n i n g h o w t o s y n t a x - h i g h l i g h t a f i l e o n G i t H u b . c o m
V i m
# Some examples of various styles:
vim: syntax=java
vim: set syntax=ruby:
vim: set filetype=prolog:
vim: set ft=cpp:
E m a c s
-*- mode: php; -*-
-*- c++ -*-
C o n t r i b u t i n g
P l e a s e c h e c k o u t o u r c o n t r i b u t i n g g u i d e l i n e s .
L i c e n s e
T h e l a n g u a g e g r a m m a r s i n c l u d e d i n t h i s g e m a r e c o v e r e d b y t h e i r r e p o s i t o r i e s ' r e s p e c t i v e l i c e n s e s .
v e n d o r / R E A D M E . m d l i s t s t h e r e p o s i t o r y f o r e a c h g r a m m a r .
A l l o t h e r f i l e s a r e c o v e r e d b y t h e M I T l i c e n s e , s e e L I C E N S E .
A b o u t
L a n g u a g e S a v a n t . I f y o u r r e p o s i t o r y ' s l a n g u a g e i s b e i n g r e p o r t e d i n c o r r e c t l y , s e n d u s a p u l l r e q u e s t !
T o p i c s
s y n t a x - h i g h l i g h t i n g
l a n g u a g e - g r a m m a r s
l a n g u a g e - s t a t i s t i c s
l i n g u i s t i c
R e s o u r c e s
R e a d m e
L i c e n s e
M I T L i c e n s e
v 7 . 1 2 . 1
L a t e s t
N o v 9 , 2 0 2 0
+ 1 5 4 r e l e a s e s
+ 8 4 4
+ 8 5 5 c o n t r i b u t o r s
L a n g u a g e s
●
R u b y
6 7 . 2 %
●
C
2 3 . 8 %
●
Go
7 . 2 %
●
L e x
1 . 2 %
●
O t h e r
0 . 6 %
● © 2 0 2 0 G i t H u b , I n c .
● T e r m s
● P r i v a c y
●
C o o k i e P r e f e r e n c e s
● S e c u r i t y
● S t a t u s
● H e l p
● C o n t a c t G i t H u b
● P r i c i n g
● A P I
● T r a i n i n g
● B l o g
● A b o u t
Y o u c a n ’ t p e r f o r m t h a t a c t i o n a t t h i s t i m e .
Y o u s i g n e d i n w i t h a n o t h e r t a b o r w i n d o w . R e l o a d t o r e f r e s h y o u r s e s s i o n .
Y o u s i g n e d o u t i n a n o t h e r t a b o r w i n d o w . R e l o a d t o r e f r e s h y o u r s e s s i o n .
W e u s e o p t i o n a l t h i r d - p a r t y a n a l y t i c s c o o k i e s t o u n d e r s t a n d h o w y o u u s e G i t H u b . c o m s o w e c a n b u i l d b e t t e r p r o d u c t s .
L e a r n m o r e .
A c c e p t
R e j e c t
W e u s e o p t i o n a l t h i r d - p a r t y a n a l y t i c s c o o k i e s t o u n d e r s t a n d h o w y o u u s e G i t H u b . c o m s o w e c a n b u i l d b e t t e r p r o d u c t s .
Y o u c a n a l w a y s u p d a t e y o u r s e l e c t i o n b y c l i c k i n g C o o k i e P r e f e r e n c e s a t t h e b o t t o m o f t h e p a g e .
F o r m o r e i n f o r m a t i o n , s e e o u r P r i v a c y S t a t e m e n t .
E s s e n t i a l c o o k i e s
W e u s e e s s e n t i a l c o o k i e s t o p e r f o r m e s s e n t i a l w e b s i t e f u n c t i o n s , e . g . t h e y ' r e u s e d t o l o g y o u i n .
L e a r n m o r e
A l w a y s a c t i v e
A n a l y t i c s c o o k i e s
W e u s e a n a l y t i c s c o o k i e s t o u n d e r s t a n d h o w y o u u s e o u r w e b s i t e s s o w e c a n m a k e t h e m b e t t e r , e . g . t h e y ' r e u s e d t o g a t h e r i n f o r m a t i o n a b o u t t h e p a g e s y o u v i s i t a n d h o w m a n y c l i c k s y o u n e e d t o a c c o m p l i s h a t a s k .
L e a r n m o r e
A c c e p t
R e j e c t
S a v e p r e f e r e n c e s