mirror of https://github.com/XAMPPRocky/tokei
Implemented config files
This commit is contained in:
parent
d455a22ac0
commit
755070ee84
|
|
@ -0,0 +1,3 @@
|
|||
columns = 80
|
||||
types = ["Python"]
|
||||
treat_doc_strings_as_comments = true
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "0.6.8"
|
||||
version = "0.6.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -15,11 +15,25 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "arrayvec"
|
||||
version = "0.4.7"
|
||||
name = "argon2rs"
|
||||
version = "0.2.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"scoped_threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "arrayref"
|
||||
version = "0.3.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "arrayvec"
|
||||
version = "0.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -27,19 +41,68 @@ name = "atty"
|
|||
version = "0.2.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "backtrace"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "backtrace-sys"
|
||||
version = "0.1.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "blake2-rfc"
|
||||
version = "0.2.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "block-buffer"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "byte-tools"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "byteorder"
|
||||
version = "1.2.6"
|
||||
version = "1.2.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.25"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
|
@ -69,16 +132,21 @@ dependencies = [
|
|||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "constant_time_eq"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-channel"
|
||||
version = "0.2.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"crossbeam-epoch 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-epoch 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -95,24 +163,24 @@ name = "crossbeam-epoch"
|
|||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-epoch"
|
||||
version = "0.6.0"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
|
@ -130,6 +198,32 @@ name = "crossbeam-utils"
|
|||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-utils"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "digest"
|
||||
version = "0.7.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dirs"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_users 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dtoa"
|
||||
version = "0.4.3"
|
||||
|
|
@ -142,7 +236,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "encoding_rs"
|
||||
version = "0.8.10"
|
||||
version = "0.8.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
@ -153,7 +247,7 @@ name = "encoding_rs_io"
|
|||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"encoding_rs 0.8.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding_rs 0.8.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -162,12 +256,37 @@ version = "0.5.13"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "failure"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "failure_derive"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fake-simd"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "fnv"
|
||||
version = "1.0.6"
|
||||
|
|
@ -187,16 +306,24 @@ name = "fuchsia-zircon-sys"
|
|||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "generic-array"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "globset"
|
||||
version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -206,18 +333,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "handlebars"
|
||||
version = "1.0.5"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pest_derive 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pest 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pest_derive 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"walkdir 2.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -227,7 +354,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "humantime"
|
||||
version = "1.1.1"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
@ -240,13 +367,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
dependencies = [
|
||||
"crossbeam-channel 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"same-file 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"walkdir 2.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
|
@ -266,15 +393,12 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.1.0"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.43"
|
||||
version = "0.2.44"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
|
@ -284,28 +408,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
version = "0.1.4"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.5"
|
||||
version = "0.4.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "maplit"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.1.0"
|
||||
version = "2.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
|
@ -316,7 +445,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "nodrop"
|
||||
version = "0.1.12"
|
||||
version = "0.1.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
|
@ -324,12 +453,12 @@ name = "num_cpus"
|
|||
version = "1.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "owning_ref"
|
||||
version = "0.3.3"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
@ -340,7 +469,7 @@ name = "parking_lot"
|
|||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lock_api 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
|
@ -349,31 +478,55 @@ name = "parking_lot_core"
|
|||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pest"
|
||||
version = "1.0.6"
|
||||
version = "2.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"ucd-trie 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pest_derive"
|
||||
version = "1.0.8"
|
||||
version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pest 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pest_generator 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pest_generator"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"pest 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pest_meta 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pest_meta"
|
||||
version = "2.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pest 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sha-1 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "0.4.20"
|
||||
version = "0.4.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
@ -386,15 +539,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "0.3.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "0.6.8"
|
||||
version = "0.6.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -403,7 +551,7 @@ version = "0.4.3"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
|
@ -414,7 +562,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
dependencies = [
|
||||
"cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
|
@ -434,7 +582,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "rayon"
|
||||
version = "1.0.2"
|
||||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
@ -448,14 +596,14 @@ version = "1.4.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.1.40"
|
||||
version = "0.1.43"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
|
@ -463,27 +611,38 @@ name = "redox_termios"
|
|||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_users"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"argon2rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.0.5"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.6.2"
|
||||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -494,6 +653,11 @@ dependencies = [
|
|||
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc-demangle"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
version = "0.2.3"
|
||||
|
|
@ -504,17 +668,22 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
version = "0.2.6"
|
||||
version = "0.2.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "same-file"
|
||||
version = "1.0.3"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "scoped_threadpool"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "scopeguard"
|
||||
version = "0.3.3"
|
||||
|
|
@ -543,7 +712,7 @@ name = "serde_cbor"
|
|||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
|
@ -553,24 +722,24 @@ name = "serde_derive"
|
|||
version = "1.0.80"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.32"
|
||||
version = "1.0.33"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_yaml"
|
||||
version = "0.8.6"
|
||||
version = "0.8.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
@ -579,9 +748,20 @@ dependencies = [
|
|||
"yaml-rust 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha-1"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"block-buffer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "0.6.5"
|
||||
version = "0.6.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
@ -599,30 +779,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "0.11.11"
|
||||
version = "0.14.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "0.15.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "synom"
|
||||
version = "0.11.3"
|
||||
name = "syn"
|
||||
version = "0.15.22"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "synstructure"
|
||||
version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -640,7 +823,7 @@ version = "0.3.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
|
@ -657,8 +840,8 @@ name = "termion"
|
|||
version = "1.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
|
@ -675,7 +858,7 @@ name = "thread_local"
|
|||
version = "0.3.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -683,39 +866,54 @@ name = "tokei"
|
|||
version = "8.0.1"
|
||||
dependencies = [
|
||||
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"dirs 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"encoding_rs_io 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"handlebars 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"handlebars 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ignore 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rayon 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_cbor 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_yaml 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_yaml 0.8.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"term_size 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ucd-util"
|
||||
name = "toml"
|
||||
version = "0.4.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "typenum"
|
||||
version = "1.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "ucd-trie"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "ucd-util"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.1.0"
|
||||
|
|
@ -731,7 +929,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "utf8-ranges"
|
||||
version = "1.0.1"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
|
@ -751,10 +949,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "walkdir"
|
||||
version = "2.2.5"
|
||||
version = "2.2.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"same-file 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
|
@ -814,99 +1012,123 @@ dependencies = [
|
|||
]
|
||||
|
||||
[metadata]
|
||||
"checksum aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "68f56c7353e5a9547cbd76ed90f7bb5ffc3ba09d4ea9bd1d8c06c8b1142eeb5a"
|
||||
"checksum aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e"
|
||||
"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
|
||||
"checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef"
|
||||
"checksum argon2rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3f67b0b6a86dae6e67ff4ca2b6201396074996379fba2b92ff649126f37cb392"
|
||||
"checksum arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee"
|
||||
"checksum arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "f405cc4c21cd8b784f6c8fc2adf9bc00f59558f0049b5ec21517f875963040cc"
|
||||
"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652"
|
||||
"checksum backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "89a47830402e9981c5c41223151efcced65a0510c13097c769cede7efb34782a"
|
||||
"checksum backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "c66d56ac8dabd07f6aacdaf633f4b8262f5b3601a810a0dcddffd5c22c69daa0"
|
||||
"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12"
|
||||
"checksum byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "90492c5858dd7d2e78691cfb89f90d273a2800fc11d98f60786e5d87e2f83781"
|
||||
"checksum blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400"
|
||||
"checksum block-buffer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a076c298b9ecdb530ed9d967e74a6027d6a7478924520acddcddc24c1c8ab3ab"
|
||||
"checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40"
|
||||
"checksum byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "94f88df23a25417badc922ab0f5716cc1330e87f71ddd9203b3a3ccd9cedf75d"
|
||||
"checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16"
|
||||
"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4"
|
||||
"checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e"
|
||||
"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
|
||||
"checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e"
|
||||
"checksum crossbeam-channel 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7b85741761b7f160bc5e7e0c14986ef685b7f8bf9b7ad081c60c604bb4649827"
|
||||
"checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3"
|
||||
"checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150"
|
||||
"checksum crossbeam-epoch 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c90f1474584f38e270b5b613e898c8c328aa4f3dea85e0a27ac2e642f009416"
|
||||
"checksum crossbeam-epoch 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2449aaa4ec7ef96e5fb24db16024b935df718e9ae1cec0a1e68feeca2efca7b8"
|
||||
"checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9"
|
||||
"checksum crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "677d453a17e8bd2b913fa38e8b9cf04bcdbb5be790aa294f2389661d72036015"
|
||||
"checksum crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c55913cc2799171a550e307918c0a360e8c16004820291bf3b638969b4a01816"
|
||||
"checksum digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "03b072242a8cbaf9c145665af9d250c59af3b958f83ed6824e13533cf76d5b90"
|
||||
"checksum dirs 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "88972de891f6118092b643d85a0b28e0678e0f948d7f879aa32f2d5aafe97d2a"
|
||||
"checksum dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d301140eb411af13d3115f9a562c85cc6b541ade9dfa314132244aaee7489dd"
|
||||
"checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0"
|
||||
"checksum encoding_rs 0.8.10 (registry+https://github.com/rust-lang/crates.io-index)" = "065f4d0c826fdaef059ac45487169d918558e3cf86c9d89f6e81cf52369126e5"
|
||||
"checksum encoding_rs 0.8.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1a8fa54e6689eb2549c4efed8d00d7f3b2b994a064555b0e8df4ae3764bcc4be"
|
||||
"checksum encoding_rs_io 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "098f6a0ab73a9ba256b71344dc82c6d7e252736ad9db7f4e35345f3a1f8713f5"
|
||||
"checksum env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)" = "15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38"
|
||||
"checksum failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6dd377bcc1b1b7ce911967e3ec24fa19c3224394ec05b54aa7b083d498341ac7"
|
||||
"checksum failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "64c2d913fe8ed3b6c6518eedf4538255b989945c14c2a7d5cbff62a5e2120596"
|
||||
"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
|
||||
"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3"
|
||||
"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
|
||||
"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
|
||||
"checksum generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef25c5683767570c2bbd7deba372926a55eaae9982d7726ee2a1050239d45b9d"
|
||||
"checksum globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4743617a7464bbda3c8aec8558ff2f9429047e025771037df561d383337ff865"
|
||||
"checksum half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9353c2a89d550b58fa0061d8ed8d002a7d8cdf2494eb0e432859bd3a9e543836"
|
||||
"checksum handlebars 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3623110a77811256820e92df1b3b286f6f44f99d1f77a94b75e262c28d5034f4"
|
||||
"checksum handlebars 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d82e5750d8027a97b9640e3fefa66bbaf852a35228e1c90790efd13c4b09c166"
|
||||
"checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77"
|
||||
"checksum humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0484fda3e7007f2a4a0d9c3a703ca38c71c54c55602ce4660c419fd32e188c9e"
|
||||
"checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114"
|
||||
"checksum ignore 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "36ecfc5ad80f0b1226df948c562e2cddd446096be3f644c95106400eae8a5e01"
|
||||
"checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b"
|
||||
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
|
||||
"checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7"
|
||||
"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d"
|
||||
"checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1"
|
||||
"checksum libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)" = "10923947f84a519a45c8fefb7dd1b3e8c08747993381adee176d7a82b4195311"
|
||||
"checksum linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70fb39025bc7cdd76305867c4eccf2f2dcf6e9a57f5b21a93e1c2d86cd03ec9e"
|
||||
"checksum lock_api 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "775751a3e69bde4df9b38dd00a1b5d6ac13791e4223d4a0506577f0dd27cfb7a"
|
||||
"checksum log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fcce5fa49cc693c312001daf1d13411c4a5283796bac1084299ea3e567113f"
|
||||
"checksum memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4b3629fe9fdbff6daa6c33b90f7c08355c1aca05a3d01fa8063b822fcf185f3b"
|
||||
"checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c"
|
||||
"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
|
||||
"checksum maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "08cbb6b4fef96b6d77bfc40ec491b1690c779e77b05cd9f07f787ed376fd4c43"
|
||||
"checksum memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0a3eb002f0535929f1199681417029ebea04aadc0c7a4224b46be99c7f5d6a16"
|
||||
"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3"
|
||||
"checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2"
|
||||
"checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945"
|
||||
"checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30"
|
||||
"checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37"
|
||||
"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13"
|
||||
"checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5"
|
||||
"checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c"
|
||||
"checksum pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0fce5d8b5cc33983fc74f78ad552b5522ab41442c4ca91606e4236eb4b5ceefc"
|
||||
"checksum pest_derive 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3294f437119209b084c797604295f40227cffa35c57220b1e99a6ff3bf8ee4"
|
||||
"checksum proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)" = "3d7b7eaaa90b4a90a932a9ea6666c95a389e424eff347f0f793979289429feee"
|
||||
"checksum pest 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a677051ad923732bb5c70f2d45f8985a96e3eee2e2bff86697e3b11b0c3fcfde"
|
||||
"checksum pest_derive 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b76f477146419bc539a63f4ef40e902166cb43b3e51cecc71d9136fd12c567e7"
|
||||
"checksum pest_generator 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ebee4e9680be4fd162e6f3394ae4192a6b60b1e4d17d845e631f0c68d1a3386"
|
||||
"checksum pest_meta 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1f6d5f6f0e6082578c86af197d780dc38328e3f768cec06aac9bc46d714e8221"
|
||||
"checksum proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "77619697826f31a02ae974457af0b29b723e5619e113e9397b8b82c6bd253f09"
|
||||
"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0"
|
||||
"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a"
|
||||
"checksum quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dd636425967c33af890042c483632d33fa7a18f19ad1d7ea72e8998c6ef8dea5"
|
||||
"checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c"
|
||||
"checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd"
|
||||
"checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c"
|
||||
"checksum rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1961a422c4d189dfb50ffa9320bf1f2a9bd54ecb92792fb9477f99a1045f3372"
|
||||
"checksum rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0905b6b7079ec73b314d4c748701f6931eb79fd97c668caa3f1899b22b32c6db"
|
||||
"checksum rayon 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "df7a791f788cb4c516f0e091301a29c2b71ef680db5e644a7d68835c8ae6dbfa"
|
||||
"checksum rayon 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "373814f27745b2686b350dd261bfd24576a6fb0e2c5919b3a2b6005f820b0473"
|
||||
"checksum rayon-core 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b055d1e92aba6877574d8fe604a63c8b5df60f60e5982bf7ccbb1338ea527356"
|
||||
"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1"
|
||||
"checksum redox_syscall 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "679da7508e9a6390aeaf7fbd02a800fdc64b73fe2204dd2c8ae66d22d9d5ad5d"
|
||||
"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"
|
||||
"checksum regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2069749032ea3ec200ca51e4a31df41759190a88edca0d2d86ee8bedf7073341"
|
||||
"checksum regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "747ba3b235651f6e2f67dfa8bcdcd073ddb7c243cb21c442fc12395dfcac212d"
|
||||
"checksum redox_users 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "214a97e49be64fd2c86f568dd0cb2c757d2cc53de95b273b6ad0a1c908482f26"
|
||||
"checksum regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37e7cbbd370869ce2e8dff25c7018702d10b21a20ef7135316f8daecd6c25b7f"
|
||||
"checksum regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4e47a2ed29da7a9e1960e1639e7a982e6edc6d49be308a3b02daf511504a16d1"
|
||||
"checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5"
|
||||
"checksum rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "bcfe5b13211b4d78e5c2cadfebd7769197d95c639c35a50057eb4c05de811395"
|
||||
"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
|
||||
"checksum ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7153dd96dade874ab973e098cb62fcdbb89a03682e46b144fd09550998d4a4a7"
|
||||
"checksum same-file 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10f7794e2fda7f594866840e95f5c5962e886e228e68b6505885811a94dd728c"
|
||||
"checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7"
|
||||
"checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267"
|
||||
"checksum scoped_threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8"
|
||||
"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27"
|
||||
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
|
||||
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
||||
"checksum serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "15c141fc7027dd265a47c090bf864cf62b42c4d228bbcf4e51a0c9e2b0d3f7ef"
|
||||
"checksum serde_cbor 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "45cd6d95391b16cd57e88b68be41d504183b7faae22030c0cc3b3f73dd57b2fd"
|
||||
"checksum serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "225de307c6302bec3898c51ca302fc94a7a1697ef0845fcee6448f33c032249c"
|
||||
"checksum serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)" = "43344e7ce05d0d8280c5940cabb4964bea626aa58b1ec0e8c73fa2a8512a38ce"
|
||||
"checksum serde_yaml 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)" = "980f5cc4e92ba24ba471b6a7b3df17d5b7b2c16fb1900a1aa0a79062320b16c4"
|
||||
"checksum smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "153ffa32fd170e9944f7e0838edf824a754ec4c1fc64746fcc9fe1f8fa602e5d"
|
||||
"checksum serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "c37ccd6be3ed1fdf419ee848f7c758eb31b054d7cd3ae3600e3bae0adf569811"
|
||||
"checksum serde_yaml 0.8.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0887a8e097a69559b56aa2526bf7aff7c3048cf627dff781f0b56a6001534593"
|
||||
"checksum sha-1 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "51b9d1f3b5de8a167ab06834a7c883bd197f2191e1dda1a22d9ccfeedbf9aded"
|
||||
"checksum smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b73ea3738b47563803ef814925e69be00799a8c07420be8b996f8e98fb2336db"
|
||||
"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8"
|
||||
"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550"
|
||||
"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"
|
||||
"checksum syn 0.15.13 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4439ee8325b4e4b57e59309c3724c9a4478eaeb4eb094b6f3fac180a3b2876"
|
||||
"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6"
|
||||
"checksum syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)" = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741"
|
||||
"checksum syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)" = "ae8b29eb5210bc5cf63ed6149cbf9adfc82ac0be023d8735c176ee74a2db4da7"
|
||||
"checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015"
|
||||
"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8"
|
||||
"checksum term_size 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9e5b9a66db815dcfd2da92db471106457082577c3c278d4138ab3e3b4e189327"
|
||||
"checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f"
|
||||
"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
|
||||
"checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6"
|
||||
"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
|
||||
"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d"
|
||||
"checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f"
|
||||
"checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169"
|
||||
"checksum ucd-trie 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "71a9c5b1fe77426cf144cc30e49e955270f5086e31a6441dfa8b32efc09b9d77"
|
||||
"checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86"
|
||||
"checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526"
|
||||
"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
|
||||
"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
|
||||
"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56"
|
||||
"checksum utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd70f467df6810094968e2fce0ee1bd0e87157aceb026a8c083bcf5e25b9efe4"
|
||||
"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737"
|
||||
"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a"
|
||||
"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
|
||||
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
|
||||
"checksum walkdir 2.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "af464bc7be7b785c7ac72e266a6b67c4c9070155606f51655a650a6686204e35"
|
||||
"checksum walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d9d7ed3431229a144296213105a390676cc49c9b6a72bd19f3176c98e129fa1"
|
||||
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
|
||||
"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0"
|
||||
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
|
||||
|
|
|
|||
19
Cargo.toml
19
Cargo.toml
|
|
@ -27,11 +27,15 @@ serde_json = "1"
|
|||
|
||||
[dependencies]
|
||||
clap = "2"
|
||||
dirs = "1"
|
||||
encoding_rs_io = "0.1"
|
||||
ignore = "0.4"
|
||||
log = "0.4"
|
||||
rayon = "1"
|
||||
serde = "1"
|
||||
serde_derive = "1"
|
||||
term_size = "0.3.1"
|
||||
toml = "0.4.10"
|
||||
|
||||
[dependencies.env_logger]
|
||||
features = []
|
||||
|
|
@ -41,18 +45,10 @@ version = "0.5.0"
|
|||
optional = true
|
||||
version = "0.3"
|
||||
|
||||
[dependencies.serde]
|
||||
optional = true
|
||||
version = "1"
|
||||
|
||||
[dependencies.serde_cbor]
|
||||
optional = true
|
||||
version = "0.9"
|
||||
|
||||
[dependencies.serde_derive]
|
||||
optional = true
|
||||
version = "1"
|
||||
|
||||
[dependencies.serde_json]
|
||||
optional = true
|
||||
version = "1"
|
||||
|
|
@ -68,11 +64,10 @@ tempdir = "0.3"
|
|||
|
||||
[features]
|
||||
all = ["json", "cbor", "yaml"]
|
||||
cbor = ["io", "hex", "serde_cbor"]
|
||||
cbor = ["hex", "serde_cbor"]
|
||||
default = []
|
||||
io = ["serde_derive", "serde"]
|
||||
json = ["io", "serde_json"]
|
||||
yaml = ["io", "serde_yaml"]
|
||||
json = ["serde_json"]
|
||||
yaml = ["serde_yaml"]
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
|
|
|
|||
2
build.rs
2
build.rs
|
|
@ -96,7 +96,7 @@ fn generate_tests(out_dir: &OsStr) -> Result<(), Box<error::Error>> {
|
|||
#[test]
|
||||
fn {0}() {{
|
||||
let mut languages = Languages::new();
|
||||
languages.get_statistics(&["{1}"], Vec::new(), None);
|
||||
languages.get_statistics(&["{1}"], &[], &Config::default());
|
||||
|
||||
if languages.len() != 1 {{
|
||||
panic!("wrong languages detected: expected just {0}, found {{:?}}",
|
||||
|
|
|
|||
|
|
@ -1209,12 +1209,14 @@
|
|||
},
|
||||
"Python":{
|
||||
"base":"hash",
|
||||
"quotes":[
|
||||
["\\\"", "\\\""],
|
||||
["'", "'"],
|
||||
"doc_quotes": [
|
||||
["\\\"\\\"\\\"", "\\\"\\\"\\\""],
|
||||
["'''", "'''"]
|
||||
],
|
||||
"quotes":[
|
||||
["\\\"", "\\\""],
|
||||
["'", "'"]
|
||||
],
|
||||
"env":[
|
||||
"python",
|
||||
"python2",
|
||||
|
|
|
|||
11
src/cli.rs
11
src/cli.rs
|
|
@ -11,7 +11,7 @@ pub struct Cli<'a> {
|
|||
pub print_languages: bool,
|
||||
pub sort: Option<Sort>,
|
||||
pub types: Option<Vec<LanguageType>>,
|
||||
pub columns: usize,
|
||||
pub columns: Option<usize>,
|
||||
pub verbose: u64,
|
||||
}
|
||||
|
||||
|
|
@ -63,14 +63,7 @@ impl<'a> Cli<'a> {
|
|||
3: enable file level trace. Not recommended on multiple files")
|
||||
).get_matches();
|
||||
|
||||
let columns = matches.value_of("columns").and_then(|s| s.parse().ok())
|
||||
.unwrap_or_else(|| {
|
||||
::term_size::dimensions().map_or(FALLBACK_ROW_LEN, |(w, _)| {
|
||||
w.max(FALLBACK_ROW_LEN)
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
let columns = matches.value_of("columns").and_then(|s| s.parse().ok());
|
||||
let files = matches.is_present("files");
|
||||
let print_languages = matches.is_present("languages");
|
||||
let verbose = matches.occurrences_of("verbose");
|
||||
|
|
|
|||
|
|
@ -0,0 +1,133 @@
|
|||
// use std::collections::HashMap;
|
||||
use std::{env, fs};
|
||||
use std::path::PathBuf;
|
||||
|
||||
use language::LanguageType;
|
||||
|
||||
/// A configuration struct for how [`Languages::get_statistics`] searches and
|
||||
/// counts languages.
|
||||
///
|
||||
/// ```
|
||||
/// use tokei::Config;
|
||||
///
|
||||
/// let config = Config {
|
||||
/// treat_doc_strings_as_comments: Some(true),
|
||||
/// ..Config::default()
|
||||
/// };
|
||||
/// ```
|
||||
///
|
||||
/// [`Languages::get_statistics`]: struct.Languages.html#method.get_statistics
|
||||
#[derive(Debug, Default, Deserialize)]
|
||||
pub struct Config {
|
||||
/// Number columns to print. (Only used in the CLI).
|
||||
pub columns: Option<usize>,
|
||||
// /// A map of individual language configuration.
|
||||
// pub languages: Option<HashMap<LanguageType, LanguageConfig>>,
|
||||
/// Whether to treat doc strings in languages as comments. By default this
|
||||
/// will be `false`.
|
||||
pub treat_doc_strings_as_comments: Option<bool>,
|
||||
/// Filters languages searched to just those provided. E.g. A directory
|
||||
/// containing `C`, `Cpp`, and `Rust` with a `Config.types` of `[Cpp, Rust]`
|
||||
/// will count only `Cpp` and `Rust`.
|
||||
pub types: Option<Vec<LanguageType>>,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
|
||||
fn get_config(base: PathBuf) -> Option<Self> {
|
||||
fs::read_to_string(base.join("tokei.toml"))
|
||||
.ok()
|
||||
.or_else(|| fs::read_to_string(base.join(".tokeirc")).ok())
|
||||
.and_then(|s| toml::from_str(&s).ok())
|
||||
}
|
||||
|
||||
/// Creates a `Config` from two configuration files if they are available.
|
||||
/// Files can have two different names `tokei.toml` and `.tokeirc`.
|
||||
/// Firstly it will attempt to find a config in the configuration directory
|
||||
/// (see below), and secondly from the current directory. The current
|
||||
/// directory's configuration will take priority over the configuration
|
||||
/// directory.
|
||||
///
|
||||
/// |Platform | Value | Example |
|
||||
/// | ------- | ----- | ------- |
|
||||
/// | Linux | `$XDG_DATA_HOME` or `$HOME`/.local/share | /home/alice/.local/share |
|
||||
/// | macOS | `$HOME`/Library/Application Support | /Users/Alice/Library/Application Support |
|
||||
/// | Windows | `{FOLDERID_RoamingAppData}` | C:\Users\Alice\AppData\Roaming |
|
||||
///
|
||||
/// # Example
|
||||
/// ```toml
|
||||
/// columns = 80
|
||||
/// types = ["Python"]
|
||||
/// treat_doc_strings_as_comments = true
|
||||
///
|
||||
/// [[languages.Python]]
|
||||
/// extensions = ["py3"]
|
||||
/// ```
|
||||
pub fn from_config_files() -> Self {
|
||||
let conf_dir = ::dirs::config_dir()
|
||||
.and_then(Self::get_config)
|
||||
.unwrap_or_else(Self::default);
|
||||
|
||||
let current_dir = env::current_dir()
|
||||
.ok()
|
||||
.and_then(Self::get_config)
|
||||
.unwrap_or_else(Self::default);
|
||||
|
||||
Config {
|
||||
columns: current_dir.columns.or(conf_dir.columns),
|
||||
//languages: current_dir.languages.or(conf_dir.languages),
|
||||
treat_doc_strings_as_comments: current_dir.treat_doc_strings_as_comments
|
||||
.or(conf_dir.treat_doc_strings_as_comments),
|
||||
types: current_dir.types.or(conf_dir.types),
|
||||
..Self::default()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/// Configuration for a individual [`LanguageType`].
|
||||
///
|
||||
/// ```
|
||||
/// use std::collections::HashMap;
|
||||
/// use tokei::{Config, LanguageConfig, LanguageType};
|
||||
///
|
||||
/// let config = Config {
|
||||
/// languages: {
|
||||
/// let cpp_conf = LanguageConfig {
|
||||
/// extensions: vec![String::from("c")],
|
||||
/// };
|
||||
///
|
||||
/// let mut languages_config = HashMap::new();
|
||||
/// languages_config.insert(LanguageType::Cpp, cpp_conf);
|
||||
///
|
||||
/// Some(languages_config)
|
||||
/// },
|
||||
///
|
||||
/// ..Config::default()
|
||||
/// };
|
||||
///
|
||||
/// ```
|
||||
///
|
||||
/// [`LanguageType`]: enum.LanguageType.html
|
||||
#[derive(Debug, Default, Deserialize)]
|
||||
pub struct LanguageConfig {
|
||||
/// Additional extensions for a language. Any extensions that overlap with
|
||||
/// already defined extensions from `tokei` will be ignored.
|
||||
pub extensions: Vec<String>,
|
||||
}
|
||||
|
||||
impl LanguageConfig {
|
||||
/// Creates a new empty configuration. By default this will not change
|
||||
/// anything from the default.
|
||||
pub fn new() -> Self {
|
||||
Self::default()
|
||||
}
|
||||
|
||||
/// Accepts a `Vec<String>` representing additional extensions for a
|
||||
/// language. Any extensions that overlap with already defined extensions
|
||||
/// from `tokei` will be ignored.
|
||||
pub fn extensions(&mut self, extensions: Vec<String>) {
|
||||
self.extensions = extensions;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
|
@ -2,10 +2,15 @@
|
|||
// Use of this source code is governed by the APACHE2.0/MIT licence that can be
|
||||
// found in the LICENCE-{APACHE/MIT} file.
|
||||
|
||||
#[cfg_attr(feature = "io", derive(Deserialize, Serialize))]
|
||||
/// Represents a individual programming language. Can be used to provide
|
||||
/// information about the language, such as multi line comments, single line
|
||||
/// comments, string literal syntax, whether a given language allows nesting
|
||||
/// comments.
|
||||
#[derive(Deserialize, Serialize)]
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
|
||||
pub enum LanguageType {
|
||||
{{~#each languages}}
|
||||
#[allow(missing_docs)]
|
||||
{{~@key}},
|
||||
{{/each}}
|
||||
}
|
||||
|
|
@ -176,8 +181,8 @@ impl LanguageType {
|
|||
}
|
||||
|
||||
/// Provides every variant in a Vec
|
||||
pub fn list() -> Vec<Self> {
|
||||
return vec! [
|
||||
pub fn list() -> &'static [Self] {
|
||||
return &[
|
||||
{{#each languages}}
|
||||
{{@key}},
|
||||
{{~/each}}
|
||||
|
|
@ -324,15 +329,44 @@ impl LanguageType {
|
|||
}
|
||||
}
|
||||
|
||||
/// Returns the doc quotes of a language.
|
||||
/// ```
|
||||
/// use tokei::LanguageType;
|
||||
/// let lang = LanguageType::Python;
|
||||
/// assert_eq!(lang.doc_quotes(), &[("\"\"\"", "\"\"\""), ("'''", "'''")]);
|
||||
/// ```
|
||||
pub fn doc_quotes(self) -> &'static [(&'static str, &'static str)] {
|
||||
match self {
|
||||
{{#each languages}}
|
||||
{{#if this.doc_quotes}}
|
||||
{{~@key}} =>
|
||||
&[
|
||||
{{~#each this.doc_quotes}}
|
||||
(
|
||||
{{~#each this}}
|
||||
"{{this}}",
|
||||
{{~/each}}
|
||||
),
|
||||
{{~/each}}
|
||||
],
|
||||
{{~/if}}
|
||||
{{~/each}}
|
||||
_ => &[],
|
||||
}
|
||||
}
|
||||
|
||||
/// Get language from a file path. May open and read the file.
|
||||
///
|
||||
/// ```no_run
|
||||
/// # use tokei::*;
|
||||
/// let rust = LanguageType::from_path("./main.rs");
|
||||
/// use tokei::{Config, LanguageType};
|
||||
///
|
||||
/// let rust = LanguageType::from_path("./main.rs", &Config::default());
|
||||
///
|
||||
/// assert_eq!(rust, Some(LanguageType::Rust));
|
||||
/// ```
|
||||
pub fn from_path<P: AsRef<Path>>(entry: P) -> Option<Self> {
|
||||
pub fn from_path<P: AsRef<Path>>(entry: P, _config: &Config)
|
||||
-> Option<Self>
|
||||
{
|
||||
let entry = entry.as_ref();
|
||||
|
||||
if let Some(filename) = fsutils::get_filename(&entry) {
|
||||
|
|
@ -355,6 +389,16 @@ impl LanguageType {
|
|||
.or_else(|| get_filetype_from_shebang(&entry));
|
||||
|
||||
if let Some(extension) = filetype {
|
||||
/*
|
||||
if let Some(ref languages) = config.languages {
|
||||
for (language, lang_config) in languages {
|
||||
if lang_config.extensions.iter().any(|e| e == extension) {
|
||||
return Some(*language)
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
match extension {
|
||||
{{~#each languages}}
|
||||
{{~#if this.extensions}}
|
||||
|
|
|
|||
|
|
@ -12,13 +12,14 @@ use self::LanguageType::*;
|
|||
use stats::Stats;
|
||||
|
||||
use super::syntax::SyntaxCounter;
|
||||
use config::Config;
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/language_type.rs"));
|
||||
|
||||
impl LanguageType {
|
||||
/// Parses a given `Path` using the `LanguageType`. Returning `Stats`
|
||||
/// on success and giving back ownership of PathBuf on error.
|
||||
pub fn parse(self, path: PathBuf) -> Result<Stats, (io::Error, PathBuf)> {
|
||||
pub fn parse(self, path: PathBuf, config: &Config) -> Result<Stats, (io::Error, PathBuf)> {
|
||||
let text = {
|
||||
let f = match File::open(&path) {
|
||||
Ok(f) => f,
|
||||
|
|
@ -32,11 +33,16 @@ impl LanguageType {
|
|||
}
|
||||
s
|
||||
};
|
||||
Ok(self.parse_from_str(path, &text))
|
||||
|
||||
Ok(self.parse_from_str(path, &text, config))
|
||||
}
|
||||
|
||||
/// Parses the text provided. Returning `Stats` on success.
|
||||
pub fn parse_from_str(self, path: PathBuf, text: &str) -> Stats
|
||||
pub fn parse_from_str(self,
|
||||
path: PathBuf,
|
||||
text: &str,
|
||||
config: &Config)
|
||||
-> Stats
|
||||
{
|
||||
let lines = text.lines();
|
||||
let mut stats = Stats::new(path);
|
||||
|
|
@ -47,7 +53,7 @@ impl LanguageType {
|
|||
stats.code = count;
|
||||
stats
|
||||
} else {
|
||||
self.parse_lines(lines, stats)
|
||||
self.parse_lines(config, lines, stats)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -84,8 +90,9 @@ impl LanguageType {
|
|||
|
||||
#[inline]
|
||||
fn parse_lines<'a>(self,
|
||||
lines: impl IntoIterator<Item=&'a str>,
|
||||
mut stats: Stats)
|
||||
config: &Config,
|
||||
lines: impl IntoIterator<Item=&'a str>,
|
||||
mut stats: Stats)
|
||||
-> Stats
|
||||
{
|
||||
let mut syntax = SyntaxCounter::new(self);
|
||||
|
|
@ -115,7 +122,6 @@ impl LanguageType {
|
|||
continue;
|
||||
}
|
||||
|
||||
|
||||
'window: for i in 0..line.len() {
|
||||
if skip != 0 {
|
||||
skip -= 1;
|
||||
|
|
@ -145,6 +151,7 @@ impl LanguageType {
|
|||
}
|
||||
|
||||
if syntax.parse_line_comment(window) {
|
||||
ended_with_comments = true;
|
||||
break 'window;
|
||||
}
|
||||
|
||||
|
|
@ -152,10 +159,34 @@ impl LanguageType {
|
|||
|
||||
trace!("{}", line);
|
||||
|
||||
if ((!syntax.stack.is_empty() || ended_with_comments) && had_multi_line) ||
|
||||
(syntax.start_of_comments().any(|comment| line.starts_with(comment)) &&
|
||||
syntax.quote.is_none())
|
||||
{
|
||||
let is_comments =
|
||||
(
|
||||
(!syntax.stack.is_empty() || ended_with_comments) &&
|
||||
had_multi_line
|
||||
) ||
|
||||
(
|
||||
// If we're currently in a comment or we just ended
|
||||
// with one.
|
||||
syntax.start_of_comments().any(|comment| {
|
||||
line.starts_with(comment)
|
||||
}) &&
|
||||
syntax.quote.is_none()
|
||||
) ||
|
||||
(
|
||||
(
|
||||
// If we're currently in a doc string or we just ended
|
||||
// with one.
|
||||
syntax.quote.is_some() ||
|
||||
syntax.doc_quotes.iter().any(|(s, _)| line.starts_with(s))
|
||||
) &&
|
||||
// `Some(true)` is import in order to respect the current
|
||||
// configuration.
|
||||
config.treat_doc_strings_as_comments == Some(true) &&
|
||||
syntax.quote_is_doc_quote
|
||||
);
|
||||
|
||||
|
||||
if is_comments {
|
||||
stats.comments += 1;
|
||||
trace!("Comment No.{}", stats.comments);
|
||||
trace!("Was the Comment stack empty?: {}", !had_multi_line);
|
||||
|
|
|
|||
|
|
@ -8,28 +8,21 @@ use std::ops::{AddAssign, Deref, DerefMut};
|
|||
|
||||
use rayon::prelude::*;
|
||||
|
||||
#[cfg(feature = "io")] use serde;
|
||||
use serde;
|
||||
|
||||
use config::Config;
|
||||
use super::{Language, LanguageType};
|
||||
use utils;
|
||||
|
||||
|
||||
/// A collection of existing languages([_List of Languages_](https://github.com/Aaronepower/tokei#supported-languages))
|
||||
#[derive(Debug, Default)]
|
||||
/// A newtype representing a list of languages counted in the provided
|
||||
/// directory.
|
||||
/// ([_List of
|
||||
/// Languages_](https://github.com/Aaronepower/tokei#supported-languages))
|
||||
#[derive(Debug, Default, Serialize)]
|
||||
pub struct Languages {
|
||||
inner: BTreeMap<LanguageType, Language>,
|
||||
}
|
||||
|
||||
#[cfg(feature = "io")]
|
||||
impl serde::Serialize for Languages {
|
||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||
where S: serde::Serializer {
|
||||
let map = self.remove_empty();
|
||||
map.serialize(serializer)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "io")]
|
||||
impl<'de> serde::Deserialize<'de> for Languages {
|
||||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
||||
where D: serde::Deserializer<'de> {
|
||||
|
|
@ -40,7 +33,7 @@ impl<'de> serde::Deserialize<'de> for Languages {
|
|||
}
|
||||
|
||||
impl Languages {
|
||||
#[cfg(feature = "io")]
|
||||
|
||||
fn from_previous(map: BTreeMap<LanguageType, Language>) -> Self {
|
||||
use std::collections::btree_map::Entry::*;
|
||||
let mut _self = Self::new();
|
||||
|
|
@ -58,25 +51,33 @@ impl Languages {
|
|||
_self
|
||||
}
|
||||
|
||||
/// Get statistics from the list of paths provided, and a list ignored
|
||||
/// keywords to ignore paths containing them.
|
||||
/// Populates the `Languages` struct with statistics about languages
|
||||
/// provided by [`Language`].
|
||||
///
|
||||
/// Takes a `&[&str]` of paths to recursively traverse, paths can be
|
||||
/// relative, absolute or glob paths. a second `&[&str]` of paths to ignore,
|
||||
/// these strings use the `.gitignore` syntax, such as `target`
|
||||
/// or `**/*.bk`.
|
||||
///
|
||||
/// ```no_run
|
||||
/// # use tokei::*;
|
||||
/// use tokei::{Config, Languages};
|
||||
///
|
||||
/// let mut languages = Languages::new();
|
||||
/// languages.get_statistics(&["."], vec![".git", "target"], None);
|
||||
/// languages.get_statistics(&["."], &[".git", "target"], &Config::default());
|
||||
/// ```
|
||||
///
|
||||
/// [`Language`]: struct.Language.html
|
||||
pub fn get_statistics(&mut self,
|
||||
paths: &[&str],
|
||||
ignored: Vec<&str>,
|
||||
types: Option<Vec<LanguageType>>)
|
||||
ignored: &[&str],
|
||||
config: &Config)
|
||||
{
|
||||
utils::fs::get_all_files(paths, ignored, &mut self.inner, types);
|
||||
|
||||
utils::fs::get_all_files(paths, ignored, &mut self.inner, config);
|
||||
self.inner.par_iter_mut().for_each(|(_, l)| l.total());
|
||||
}
|
||||
|
||||
/// Constructs a new, blank `Languages`.
|
||||
/// Constructs a new, Languages struct. Languages is always empty and does
|
||||
/// not allocate.
|
||||
///
|
||||
/// ```
|
||||
/// # use tokei::*;
|
||||
|
|
@ -85,30 +86,6 @@ impl Languages {
|
|||
pub fn new() -> Self {
|
||||
Languages::default()
|
||||
}
|
||||
|
||||
/// Creates a new map that only contains non empty languages.
|
||||
///
|
||||
/// ```
|
||||
/// use tokei::*;
|
||||
/// use std::collections::BTreeMap;
|
||||
///
|
||||
/// let mut languages = Languages::new();
|
||||
/// languages.get_statistics(&["doesnt/exist"], vec![".git"], None);
|
||||
///
|
||||
/// let empty_map = languages.remove_empty();
|
||||
///
|
||||
/// assert_eq!(empty_map.len(), 0);
|
||||
/// ```
|
||||
pub fn remove_empty(&self) -> BTreeMap<&LanguageType, &Language> {
|
||||
let mut map = BTreeMap::new();
|
||||
|
||||
for (name, language) in &self.inner {
|
||||
if !language.is_empty() {
|
||||
map.insert(name, language);
|
||||
}
|
||||
}
|
||||
map
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoIterator for Languages {
|
||||
|
|
|
|||
|
|
@ -16,19 +16,18 @@ use sort::Sort::*;
|
|||
use sort::Sort;
|
||||
use stats::Stats;
|
||||
|
||||
/// Struct representing a single Language.
|
||||
#[cfg_attr(feature = "io", derive(Deserialize, Serialize))]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
/// A struct representing statistics about a single Language.
|
||||
#[derive(Clone, Debug, Deserialize, Default, Serialize)]
|
||||
pub struct Language {
|
||||
/// Number of blank lines.
|
||||
/// The total number of blank lines.
|
||||
pub blanks: usize,
|
||||
/// Number of lines of code.
|
||||
/// The total number of lines of code.
|
||||
pub code: usize,
|
||||
/// Number of comments(both single, and multi-line)
|
||||
/// The total number of comments(both single, and multi-line)
|
||||
pub comments: usize,
|
||||
/// Number of total lines.
|
||||
/// The total number of total lines.
|
||||
pub lines: usize,
|
||||
/// A collection of statistics based on the files provide from `files`
|
||||
/// A collection of statistics of individual files.
|
||||
pub stats: Vec<Stats>,
|
||||
/// Whether this language had problems with file parsing
|
||||
pub inaccurate: bool,
|
||||
|
|
@ -45,7 +44,23 @@ impl Language {
|
|||
Self::default()
|
||||
}
|
||||
|
||||
/// Adds file stats to the Language.
|
||||
/// Add a `Stat` to the Language. This will not update the totals in the
|
||||
/// Language struct.
|
||||
///
|
||||
/// ```
|
||||
/// use std::path::PathBuf;
|
||||
/// use tokei::{Language, Stats};
|
||||
///
|
||||
/// let mut language = Language::new();
|
||||
///
|
||||
/// language.add_stat(Stats {
|
||||
/// lines: 10,
|
||||
/// code: 4,
|
||||
/// comments: 3,
|
||||
/// blanks: 3,
|
||||
/// name: PathBuf::from("test.rs"),
|
||||
/// });
|
||||
/// ```
|
||||
pub fn add_stat(&mut self, stat: Stats) {
|
||||
self.stats.push(stat);
|
||||
}
|
||||
|
|
@ -56,7 +71,29 @@ impl Language {
|
|||
self.inaccurate = true;
|
||||
}
|
||||
|
||||
/// Totals up all the statistics currently in the language.
|
||||
/// Totals up the statistics of the `Stat` structs currently contained in
|
||||
/// the language.
|
||||
///
|
||||
/// ```
|
||||
/// use std::path::PathBuf;
|
||||
/// use tokei::{Language, Stats};
|
||||
///
|
||||
/// let mut language = Language::new();
|
||||
///
|
||||
/// language.add_stat(Stats {
|
||||
/// lines: 10,
|
||||
/// code: 4,
|
||||
/// comments: 3,
|
||||
/// blanks: 3,
|
||||
/// name: PathBuf::from("test.rs"),
|
||||
/// });
|
||||
///
|
||||
/// assert_eq!(0, language.lines);
|
||||
///
|
||||
/// language.total();
|
||||
///
|
||||
/// assert_eq!(10, language.lines);
|
||||
/// ```
|
||||
pub fn total(&mut self) {
|
||||
let mut blanks = 0;
|
||||
let mut code = 0;
|
||||
|
|
@ -91,8 +128,36 @@ impl Language {
|
|||
}
|
||||
|
||||
/// Sorts each of the `Stats` structs contained in the language based
|
||||
/// on what category is provided
|
||||
/// panic!'s if given the wrong category.
|
||||
/// on what category is provided.
|
||||
///
|
||||
/// ```
|
||||
/// use std::path::PathBuf;
|
||||
/// use tokei::{Language, Sort, Stats};
|
||||
///
|
||||
/// let mut language = Language::new();
|
||||
///
|
||||
/// language.add_stat(Stats {
|
||||
/// lines: 10,
|
||||
/// code: 8,
|
||||
/// comments: 0,
|
||||
/// blanks: 2,
|
||||
/// name: PathBuf::from("test.rs"),
|
||||
/// });
|
||||
///
|
||||
/// language.add_stat(Stats {
|
||||
/// lines: 20,
|
||||
/// code: 4,
|
||||
/// comments: 13,
|
||||
/// blanks: 3,
|
||||
/// name: PathBuf::from("testsuite.rs"),
|
||||
/// });
|
||||
///
|
||||
/// language.sort_by(Sort::Lines);
|
||||
/// assert_eq!(20, language.stats[0].lines);
|
||||
///
|
||||
/// language.sort_by(Sort::Code);
|
||||
/// assert_eq!(8, language.stats[0].code);
|
||||
/// ```
|
||||
pub fn sort_by(&mut self, category: Sort) {
|
||||
match category {
|
||||
Blanks => self.stats.sort_by(|a, b| b.blanks.cmp(&a.blanks)),
|
||||
|
|
|
|||
|
|
@ -3,24 +3,28 @@ use log::Level::Trace;
|
|||
use super::language_type::LanguageType;
|
||||
|
||||
pub(crate) struct SyntaxCounter {
|
||||
pub(crate) is_fortran: bool,
|
||||
pub(crate) allows_nested: bool,
|
||||
pub(crate) doc_quotes: &'static [(&'static str, &'static str)],
|
||||
pub(crate) is_fortran: bool,
|
||||
pub(crate) line_comments: &'static [&'static str],
|
||||
pub(crate) multi_line_comments: &'static [(&'static str, &'static str)],
|
||||
pub(crate) nested_comments: &'static [(&'static str, &'static str)],
|
||||
pub(crate) quote: Option<&'static str>,
|
||||
pub(crate) quote_is_doc_quote: bool,
|
||||
pub(crate) quotes: &'static [(&'static str, &'static str)],
|
||||
pub(crate) stack: Vec<&'static str>,
|
||||
pub(crate) quote: Option<&'static str>,
|
||||
}
|
||||
|
||||
impl SyntaxCounter {
|
||||
pub(crate) fn new(language: LanguageType) -> Self {
|
||||
Self {
|
||||
is_fortran: language.is_fortran(),
|
||||
allows_nested: language.allows_nested(),
|
||||
doc_quotes: language.doc_quotes(),
|
||||
is_fortran: language.is_fortran(),
|
||||
line_comments: language.line_comments(),
|
||||
multi_line_comments: language.multi_line_comments(),
|
||||
nested_comments: language.nested_comments(),
|
||||
quote_is_doc_quote: false,
|
||||
quotes: language.quotes(),
|
||||
stack: Vec::with_capacity(1),
|
||||
quote: None,
|
||||
|
|
@ -31,6 +35,7 @@ impl SyntaxCounter {
|
|||
pub(crate) fn important_syntax(&self) -> impl Iterator<Item = &str> {
|
||||
self.quotes.into_iter()
|
||||
.map(|(s, _)| *s)
|
||||
.chain(self.doc_quotes.into_iter().map(|(s, _)| *s))
|
||||
.chain(self.multi_line_comments.into_iter().map(|(s, _)| *s))
|
||||
.chain(self.nested_comments.into_iter().map(|(s, _)| *s))
|
||||
}
|
||||
|
|
@ -64,10 +69,20 @@ impl SyntaxCounter {
|
|||
return None
|
||||
}
|
||||
|
||||
for &(start, end) in self.doc_quotes {
|
||||
if window.starts_with(start.as_bytes()) {
|
||||
trace!("Start Doc {:?}", start);
|
||||
self.quote = Some(end);
|
||||
self.quote_is_doc_quote = true;
|
||||
return Some(start.len());
|
||||
}
|
||||
}
|
||||
|
||||
for &(start, end) in self.quotes {
|
||||
if window.starts_with(start.as_bytes()) {
|
||||
trace!("Start {:?}", start);
|
||||
self.quote = Some(end);
|
||||
self.quote_is_doc_quote = false;
|
||||
return Some(start.len());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
71
src/lib.rs
71
src/lib.rs
|
|
@ -1,22 +1,16 @@
|
|||
#![deny(trivial_casts,
|
||||
trivial_numeric_casts,
|
||||
unused_variables,
|
||||
unstable_features,
|
||||
unused_import_braces)]
|
||||
|
||||
//! # Tokei: Code Analysis Library
|
||||
//! # Tokei: Easily count code.
|
||||
//!
|
||||
//! A simple, effcient library for counting code in directories.
|
||||
//! [_For the binary_](https://github.com/Aaronepower/tokei/)
|
||||
//! A simple, efficient library for counting code in directories. This
|
||||
//! functionality is also provided as a
|
||||
//! [CLI utility](//github.com/Aaronepower/tokei). Tokei uses a small state
|
||||
//! machine rather than regular expressions found in other code counters. Tokei
|
||||
//! can accurately count a lot more edge cases such as nested comments, or
|
||||
//! comment syntax inside string literals.
|
||||
//!
|
||||
//! ## How to use
|
||||
//! # Examples
|
||||
//!
|
||||
//! Tokei provides both `Languages` struct which a map of many existing programming languages,
|
||||
//! and `Language` for creating custom languages.
|
||||
//!
|
||||
//! ### Example
|
||||
//!
|
||||
//! Gets the total lines of code from all rust files in current directory, and all subdirectories.
|
||||
//! Gets the total lines of code from all rust files in current directory,
|
||||
//! and all subdirectories.
|
||||
//!
|
||||
//! ```no_run
|
||||
//! extern crate tokei;
|
||||
|
|
@ -25,50 +19,47 @@
|
|||
//! use std::fs::File;
|
||||
//! use std::io::Read;
|
||||
//!
|
||||
//! use tokei::{Languages, LanguageType};
|
||||
//! use tokei::{Config, Languages, LanguageType};
|
||||
//!
|
||||
//! fn main() {
|
||||
//! // The paths to search. Accepts absolute, relative, and glob paths.
|
||||
//! let paths = &["**/*.rs"];
|
||||
//! // Exclude any path that contains any of these strings.
|
||||
//! let excluded = vec!["target", ".git"];
|
||||
//! let excluded = &["target"];
|
||||
//! // `Config` allows you to configure what is searched and counted.
|
||||
//! let config = Config::default();
|
||||
//!
|
||||
//! // Create new Languages
|
||||
//! let mut languages = Languages::new();
|
||||
//! languages.get_statistics(paths, excluded, &config);
|
||||
//! let rust = &languages[&LanguageType::Rust];
|
||||
//!
|
||||
//! // Get statistics
|
||||
//! languages.get_statistics(paths, excluded, None);
|
||||
//!
|
||||
//! // Remove empty languages
|
||||
//! let language_map = languages.remove_empty();
|
||||
//!
|
||||
//! // Get Rust from statistics
|
||||
//! let rust = language_map.get(&LanguageType::Rust).unwrap();
|
||||
//!
|
||||
//! // Print the number of lines that were code.
|
||||
//! println!("Lines of code: {}", rust.code);
|
||||
//! }
|
||||
//! ```
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
#![deny(trivial_casts,
|
||||
trivial_numeric_casts,
|
||||
unused_variables,
|
||||
unstable_features,
|
||||
unused_import_braces,
|
||||
missing_docs)]
|
||||
|
||||
#[macro_use] extern crate log;
|
||||
#[macro_use] extern crate serde_derive;
|
||||
extern crate dirs;
|
||||
extern crate encoding_rs_io;
|
||||
extern crate ignore;
|
||||
extern crate rayon;
|
||||
|
||||
#[cfg(feature = "io")]
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
|
||||
#[cfg(feature = "io")]
|
||||
extern crate serde;
|
||||
extern crate toml;
|
||||
|
||||
#[macro_use]
|
||||
mod utils;
|
||||
#[macro_use] mod utils;
|
||||
mod config;
|
||||
mod language;
|
||||
mod stats;
|
||||
mod sort;
|
||||
mod stats;
|
||||
|
||||
pub use language::{LanguageType, Languages, Language};
|
||||
pub use stats::Stats;
|
||||
pub use sort::Sort;
|
||||
pub use config::Config;
|
||||
|
|
|
|||
24
src/main.rs
24
src/main.rs
|
|
@ -9,12 +9,12 @@ extern crate term_size;
|
|||
extern crate tokei;
|
||||
|
||||
mod cli;
|
||||
mod input;
|
||||
mod cli_utils;
|
||||
mod input;
|
||||
|
||||
use std::{error::Error, process, io::{self, Write}};
|
||||
|
||||
use tokei::{Language, Languages, Sort};
|
||||
use tokei::{Language, Languages, Sort, Config};
|
||||
|
||||
use cli::Cli;
|
||||
use cli_utils::*;
|
||||
|
|
@ -22,6 +22,10 @@ use input::*;
|
|||
|
||||
fn main() -> Result<(), Box<Error>> {
|
||||
let mut cli = Cli::from_args();
|
||||
let mut config = Config::from_config_files();
|
||||
|
||||
config.types = ::std::mem::replace(&mut cli.types, None).or(config.types);
|
||||
|
||||
if cli.print_languages {
|
||||
Cli::print_supported_languages();
|
||||
process::exit(0);
|
||||
|
|
@ -38,7 +42,6 @@ fn main() -> Result<(), Box<Error>> {
|
|||
}
|
||||
|
||||
{
|
||||
let types = ::std::mem::replace(&mut cli.types, None);
|
||||
let input = cli.input();
|
||||
|
||||
for path in &input {
|
||||
|
|
@ -48,7 +51,7 @@ fn main() -> Result<(), Box<Error>> {
|
|||
}
|
||||
}
|
||||
|
||||
languages.get_statistics(&input, cli.ignored_directories(), types);
|
||||
languages.get_statistics(&input, &cli.ignored_directories(), &config);
|
||||
}
|
||||
|
||||
if let Some(format) = cli.output {
|
||||
|
|
@ -56,7 +59,14 @@ fn main() -> Result<(), Box<Error>> {
|
|||
process::exit(0);
|
||||
}
|
||||
|
||||
let row = "-".repeat(cli.columns);
|
||||
let columns = cli.columns.or(config.columns).unwrap_or_else(|| {
|
||||
term_size::dimensions().map_or(FALLBACK_ROW_LEN, |(w, _)| {
|
||||
w.max(FALLBACK_ROW_LEN)
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
let row = "-".repeat(columns);
|
||||
|
||||
let mut stdout = io::BufWriter::new(io::stdout());
|
||||
|
||||
|
|
@ -64,7 +74,7 @@ fn main() -> Result<(), Box<Error>> {
|
|||
print_inaccuracy_warning(&mut stdout)?;
|
||||
}
|
||||
|
||||
print_header(&mut stdout, &row, cli.columns)?;
|
||||
print_header(&mut stdout, &row, columns)?;
|
||||
|
||||
if let Some(sort_category) = cli.sort {
|
||||
for (_, ref mut language) in &mut languages {
|
||||
|
|
@ -98,7 +108,7 @@ fn main() -> Result<(), Box<Error>> {
|
|||
total += language;
|
||||
}
|
||||
|
||||
print_language(&mut stdout, cli.columns, &total, "Total")?;
|
||||
print_language(&mut stdout, columns, &total, "Total")?;
|
||||
writeln!(stdout, "{}", row)?;
|
||||
|
||||
Ok(())
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ use std::fmt;
|
|||
use std::path::PathBuf;
|
||||
|
||||
/// A struct representing the statistics of a file.
|
||||
#[cfg_attr(feature = "io", derive(Deserialize, Serialize))]
|
||||
#[derive(Deserialize, Serialize)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Stats {
|
||||
/// Number of blank lines within the file.
|
||||
|
|
@ -19,7 +19,9 @@ pub struct Stats {
|
|||
}
|
||||
|
||||
impl Stats {
|
||||
/// Create a new `Stats` from a `ignore::DirEntry`.
|
||||
/// Create a new `Stats` from a [`PathBuf`].
|
||||
///
|
||||
/// [`PathBuf`]: //doc.rust-lang.org/std/path/struct.PathBuf.html
|
||||
pub fn new(name: PathBuf) -> Self {
|
||||
Stats {
|
||||
blanks: 0,
|
||||
|
|
|
|||
|
|
@ -16,11 +16,12 @@ use rayon::prelude::*;
|
|||
// This is just a re-export from the auto generated file.
|
||||
pub use language::get_filetype_from_shebang;
|
||||
use language::{Language, LanguageType};
|
||||
use config::Config;
|
||||
|
||||
pub fn get_all_files(paths: &[&str],
|
||||
ignored_directories: Vec<&str>,
|
||||
ignored_directories: &[&str],
|
||||
languages: &mut BTreeMap<LanguageType, Language>,
|
||||
types: Option<Vec<LanguageType>>)
|
||||
config: &Config)
|
||||
{
|
||||
let (tx, rx) = mpsc::channel();
|
||||
|
||||
|
|
@ -69,23 +70,23 @@ pub fn get_all_files(paths: &[&str],
|
|||
})
|
||||
});
|
||||
|
||||
let types: Option<&[LanguageType]> = types.as_ref().map(|v| &**v);
|
||||
let types: Option<&[LanguageType]> = config.types.as_ref().map(|v| &**v);
|
||||
|
||||
let iter: Vec<_> = rx.into_iter()
|
||||
.collect::<Vec<_>>()
|
||||
.into_par_iter()
|
||||
.filter_map(|entry| {
|
||||
if let Some(language) = LanguageType::from_path(entry.path()) {
|
||||
if let Some(language) = LanguageType::from_path(entry.path(), &config) {
|
||||
if (types.is_some() &&
|
||||
types.map(|t| t.contains(&language)).unwrap()) ||
|
||||
types.is_none()
|
||||
{
|
||||
match language.parse(entry.into_path()) {
|
||||
match language.parse(entry.into_path(), &config) {
|
||||
Ok(s) => return Some((language, Some(s))),
|
||||
Err((e, path)) => {
|
||||
error!("{} reading {}", e.description(), path.display());
|
||||
return Some((language, None));
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -129,6 +130,7 @@ mod test {
|
|||
use std::fs::create_dir;
|
||||
use language::languages::Languages;
|
||||
use language::LanguageType;
|
||||
use config::Config;
|
||||
use self::tempdir::TempDir;
|
||||
|
||||
#[test]
|
||||
|
|
@ -137,9 +139,12 @@ mod test {
|
|||
let path_name = tmp_dir.path().join("directory.rs");
|
||||
create_dir(&path_name).expect("Couldn't create directory.rs within temp");
|
||||
|
||||
let mut l = Languages::new();
|
||||
get_all_files(&[tmp_dir.into_path().to_str().unwrap()], vec![], &mut l, None);
|
||||
let mut languages = Languages::new();
|
||||
get_all_files(&[tmp_dir.into_path().to_str().unwrap()],
|
||||
&[],
|
||||
&mut languages,
|
||||
&Config::default());
|
||||
|
||||
assert!(l.get(&LanguageType::Rust).is_none());
|
||||
assert!(languages.get(&LanguageType::Rust).is_none());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ extern crate ignore;
|
|||
use std::fs;
|
||||
|
||||
use regex::Regex;
|
||||
use tokei::Languages;
|
||||
use tokei::{Languages, Config};
|
||||
|
||||
lazy_static! {
|
||||
static ref LINES: Regex = Regex::new(r"\d+ lines").unwrap();
|
||||
|
|
@ -26,4 +26,61 @@ macro_rules! get_digit {
|
|||
}}
|
||||
}
|
||||
|
||||
mod config {
|
||||
use std::collections::HashMap;
|
||||
use tokei::*;
|
||||
|
||||
/*
|
||||
#[test]
|
||||
fn extension_change() {
|
||||
let mut languages = Languages::new();
|
||||
let config = Config {
|
||||
languages: {
|
||||
let mut map = HashMap::new();
|
||||
let mut config = LanguageConfig::new();
|
||||
config.extensions(vec![String::from("cpp")]);
|
||||
map.insert(LanguageType::C, config);
|
||||
|
||||
Some(map)
|
||||
},
|
||||
..Config::default()
|
||||
};
|
||||
|
||||
languages.get_statistics(&["tests/data/cpp.cpp"], &[], &config);
|
||||
|
||||
if languages.len() != 1 {
|
||||
panic!("wrong languages detected: expected just C, found {:?}",
|
||||
languages.into_iter().collect::<Vec<_>>());
|
||||
}
|
||||
|
||||
let (name, _) = languages.into_iter().next().unwrap();
|
||||
|
||||
assert_eq!(LanguageType::C, name);
|
||||
}
|
||||
*/
|
||||
|
||||
#[test]
|
||||
fn treating_comments_as_code() {
|
||||
let mut languages = Languages::new();
|
||||
let config = Config {
|
||||
treat_doc_strings_as_comments: Some(true),
|
||||
..Config::default()
|
||||
};
|
||||
|
||||
languages.get_statistics(&["tests/data/python.py"], &[], &config);
|
||||
|
||||
if languages.len() != 1 {
|
||||
panic!("wrong languages detected: expected just Python, found {:?}",
|
||||
languages.into_iter().collect::<Vec<_>>());
|
||||
}
|
||||
|
||||
let (_, language) = languages.into_iter().next().unwrap();
|
||||
|
||||
assert_eq!(language.lines, 15);
|
||||
assert_eq!(language.code, 5);
|
||||
assert_eq!(language.comments, 7);
|
||||
assert_eq!(language.blanks, 3);
|
||||
}
|
||||
}
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/tests.rs"));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
# 15 lines, 10 code, 2 comments, 3 blanks
|
||||
|
||||
|
||||
def add(x, y):
|
||||
"""
|
||||
Hello World
|
||||
# Real Second line
|
||||
Second line
|
||||
"""
|
||||
|
||||
string = "Hello World #\
|
||||
"
|
||||
y += len(string)
|
||||
# Add the two numbers.
|
||||
x + y
|
||||
Loading…
Reference in New Issue