Crates.io | cloc |
lib.rs | cloc |
version | 0.6.2 |
source | src |
created_at | 2020-03-09 11:59:51.171198 |
updated_at | 2020-09-30 03:50:10.694202 |
description | Count, or compute differences of, lines of source code and comments. |
homepage | |
repository | https://github.com/ltoddy/cloc-rs |
max_upload_size | |
id | 216854 |
size | 42,630 |
Count, or compute differences of, lines of source code and comments.
e.g.
macbox :: src/github.com-1ecc6299db9ec823 » cloc .
0.8915 secs
┌────────────────────────────────────────────────────────────────────────┐
| Language files size blank comment code |
├────────────────────────────────────────────────────────────────────────┤
| Bat 25 69.00 KB 321 0 2127 |
| C 2022 31.11 MB 171915 146101 806618 |
| CHeader 1684 12.19 MB 42874 131952 156036 |
| CSS 24 169.76 KB 271 92 1414 |
| Cpp 89 1.19 MB 4571 4242 28867 |
| CppHeader 73 345.98 KB 1673 1707 7456 |
| Go 5 137.84 KB 605 447 3911 |
| Haskell 1 74.00 B 1 0 3 |
| Html 252 1.55 MB 987 0 63786 |
| JavaScript 294 1.41 MB 4375 2208 19874 |
| Json 1090 1.29 MB 3 0 33999 |
| Markdown 2930 10.59 MB 78502 0 208939 |
| Protobuf 1 1.10 KB 2 0 28 |
| Python 95 865.36 KB 4095 10216 15230 |
| Ruby 175 594.49 KB 3501 3603 18335 |
| Rust 34286 306.20 MB 749237 1305784 7270348 |
| Shell 270 1.11 MB 5060 6647 28384 |
| Toml 1640 2.18 MB 8957 14968 54014 |
| Xml 236 1.23 MB 2852 1681 22814 |
| Yaml 1256 1.36 MB 4238 2892 43028 |
├────────────────────────────────────────────────────────────────────────┤
| Sum 46448 373.54 MB 1084040 1632540 8785211 |
└────────────────────────────────────────────────────────────────────────┘
$ cargo install cloc
or
$ git clone https://github.com/ltoddy/cloc-rs.git
$ cargo install --path .
src/calculator.rs
文件中, 有一个在lazy_static
中的全局变量: MANAGER
,内部有一个宏language!($name, $ext, $single, $multi)
参数解释:
unwrap()
cargo clippy --release -- -D clippy::all
限制