Skip to content

Commit 9376461

Browse files
committed
readme: add starred-block comment style, regen cmd help
1 parent 0c36f20 commit 9376461

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Flags:
7979
-c int
8080
display offending line with this many lines of context (default -1)
8181
-comment-style string
82-
Comment style (line, block) (default "line")
82+
Comment style (line, block, starred-block) (default "line")
8383
-copyright-header-matcher string
8484
Copyright header matcher regexp (used to detect existence of any copyright header) (default "(?i)copyright")
8585
-cpuprofile string
@@ -89,7 +89,7 @@ Flags:
8989
-diff
9090
with -fix, don't update the files, but print a unified diff
9191
-exclude string
92-
Paths to exclude (doublestar or r!-prefixed regexp, comma-separated) (default "**/testdata/**")
92+
Paths to exclude (doublestar or r!-prefixed regexp, comma-separated)
9393
-fix
9494
apply all suggested fixes
9595
-flags
@@ -190,8 +190,20 @@ a file. The current supported options are:
190190

191191
golicenser supports configuring the comment type used for the license headers. The options are:
192192

193+
193194
- `line` - C-style line comments (`// test`).
194-
- `block` - C++-style block comments (`/* test */`)
195+
- `block` - C++-style block comments (`/* test */`). Example:
196+
```go
197+
/*
198+
test
199+
*/
200+
```
201+
- `starred-block` - Aligned, starred block comments. Example:
202+
```go
203+
/*
204+
* test
205+
*/
206+
```
195207

196208
### Matchers
197209

cmd/golicenser/golicenser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func init() {
7171
flagSet.StringVar(&yearModeStr, "year-mode", golicenser.YearMode(0).String(),
7272
"Year formatting mode (preserve, preserve-this-year-range, preserve-modified-range, this-year, last-modified, git-range, git-modified-years)")
7373
flagSet.StringVar(&commentStyleStr, "comment-style", golicenser.CommentStyle(0).String(),
74-
"Comment style (line, block)")
74+
"Comment style (line, block, starred-block)")
7575
flagSet.StringVar(&exclude, "exclude", "",
7676
"Paths to exclude (doublestar or r!-prefixed regexp, comma-separated)")
7777
flagSet.IntVar(&maxConcurrent, "max-concurrent", golicenser.DefaultMaxConcurrent,

0 commit comments

Comments
 (0)