Skip to content

Commit 30a7951

Browse files
committed
Update readme
1 parent 53053b3 commit 30a7951

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# cloc
2-
统计指定目录下的各类语言代码文件的行数,支持的特性:
2+
统计指定目录下的各类语言代码文件的代码行数、空白行数、注释行数,支持的特性:
33
- 支持指定类型的代码文件
44
- 支持分开统计有效的代码行数、注释行数、空白行数
55
- 支持按照不同的字段进行排序展示
@@ -19,7 +19,7 @@
1919
## 示例
2020

2121
```shell
22-
cloc /src -sort code -order asc
22+
cloc /cloc -sort code -order asc
2323
```
2424
会打印输出为:
2525
```
@@ -53,17 +53,20 @@ cloc /src -sort code -order asc
5353

5454
## 参数说明
5555

56+
### sort
57+
5658
| sort | 说明 |
5759
| ----- | ----- |
5860
| files | 文件数量 |
5961
| code | 代码数量 |
6062
| comment | 注释行数 |
6163
| blank | 空白行数 |
6264

65+
### order
6366

6467
| order | 说明 |
6568
| ----- | ----- |
6669
| desc | 降序 |
6770
| asc | 升序 |
6871

69-
`order`不支持统计单个代码文件
72+
注意: `order`不支持统计单个代码文件

main.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ func main() {
5454
os.Exit(code)
5555
}
5656

57-
const helptext = `if you want count file, like JavaScript file, you can input:
57+
const helptext = `if you want count code file, like JavaScript file, you can input:
5858
59-
cloc ./demo.js -sort code -order desc
59+
cloc ./demo.js -sort code
6060
6161
the cloc tool support these types of file:
6262
----- JavaScript
@@ -65,12 +65,11 @@ const helptext = `if you want count file, like JavaScript file, you can input:
6565
----- HTML
6666
----- SCSS
6767
----- CSS
68+
----- Golang
6869
6970
if you want count directory, you can input:
7071
7172
cloc ./dirdemo
72-
73-
the directory census does not support options.
7473
`
7574

7675
type cmder interface {

0 commit comments

Comments
 (0)