Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
quixote-liu committed Jul 19, 2022
1 parent 53053b3 commit 30a7951
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# cloc
统计指定目录下的各类语言代码文件的行数,支持的特性:
统计指定目录下的各类语言代码文件的代码行数、空白行数、注释行数,支持的特性:
- 支持指定类型的代码文件
- 支持分开统计有效的代码行数、注释行数、空白行数
- 支持按照不同的字段进行排序展示
Expand All @@ -19,7 +19,7 @@
## 示例

```shell
cloc /src -sort code -order asc
cloc /cloc -sort code -order asc
```
会打印输出为:
```
Expand Down Expand Up @@ -53,17 +53,20 @@ cloc /src -sort code -order asc

## 参数说明

### sort

| sort | 说明 |
| ----- | ----- |
| files | 文件数量 |
| code | 代码数量 |
| comment | 注释行数 |
| blank | 空白行数 |

### order

| order | 说明 |
| ----- | ----- |
| desc | 降序 |
| asc | 升序 |

`order`不支持统计单个代码文件
注意: `order`不支持统计单个代码文件
7 changes: 3 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ func main() {
os.Exit(code)
}

const helptext = `if you want count file, like JavaScript file, you can input:
const helptext = `if you want count code file, like JavaScript file, you can input:
cloc ./demo.js -sort code -order desc
cloc ./demo.js -sort code
the cloc tool support these types of file:
----- JavaScript
Expand All @@ -65,12 +65,11 @@ const helptext = `if you want count file, like JavaScript file, you can input:
----- HTML
----- SCSS
----- CSS
----- Golang
if you want count directory, you can input:
cloc ./dirdemo
the directory census does not support options.
`

type cmder interface {
Expand Down

0 comments on commit 30a7951

Please sign in to comment.