Skip to content

Commit 406686d

Browse files
committed
Update doc comments for buildifier_warnings to match generated output
1 parent 7a1483f commit 406686d

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

doc/codefmt.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,22 +117,22 @@ Options:
117117
an error and do no formatting.
118118
Default: '' `
119119

120-
*codefmt:buildifier_warnings*
121-
The warnings passed to buildifier to modify the defaults. Whatever is
122-
specified is added to the commandline after '--warnings='. For example, if you
120+
*codefmt:buildifier_warnings*
121+
The warnings options passed to buildifier to modify the defaults. Whatever is
122+
specified is added to the commandline after "--warnings=". For example, if you
123123
add this to your config:
124-
125-
Glaive codefmt buildifier_warnings='-module-docstring,+unsorted-dict-items'
126-
127-
Then buildifier will omit the 'module-docstring' warning, but add
128-
'unsorted-dict-items' (which is ignored by default). This works also in
124+
>
125+
Glaive codefmt buildifier_warnings='-module-docstring,+unsorted-dict-items'
126+
<
127+
Then buildifier will omit the "module-docstring" warning, but add
128+
"unsorted-dict-items" (which is ignored by default). This works also in
129129
fix-mode, in which case dictionary items will be resorted upon buffer save.
130130

131131
Options:
132132
"" (empty): Use default warnings from buildifier.
133133
"-some-warning": Remove 'some-warning' from the warning set.
134134
"+some-warning": Add 'some-warning' to the warning set.
135-
Default: ''
135+
Default: '' `
136136

137137
*codefmt:google_java_executable*
138138
The path to the google-java executable. Generally, this should have the form:

instant/flags.vim

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,19 @@ call s:plugin.Flag('buildifier_executable', 'buildifier')
112112
call s:plugin.Flag('buildifier_lint_mode', '')
113113

114114
""
115-
" The warnings for buildifier. passed to buildifier --warnings parameter.
115+
" The warnings options passed to buildifier to modify the defaults. Whatever is
116+
" specified is added to the commandline after "--warnings=". For example, if you
117+
" add this to your config: >
118+
" Glaive codefmt buildifier_warnings='-module-docstring,+unsorted-dict-items'
119+
" <
120+
" Then buildifier will omit the "module-docstring" warning, but add
121+
" "unsorted-dict-items" (which is ignored by default). This works also in
122+
" fix-mode, in which case dictionary items will be resorted upon buffer save.
116123
"
117124
" Options:
118-
"" (empty): Use default warnings from buildifier.
119-
"-some-warning": Remove 'some-warning' from the warning set.
120-
"+some-warning": Add 'some-warning' to the warning set.
125+
" - "" (empty): Use default warnings from buildifier.
126+
" - "-some-warning": Remove 'some-warning' from the warning set.
127+
" - "+some-warning": Add 'some-warning' to the warning set.
121128
call s:plugin.Flag('buildifier_warnings', '')
122129

123130
""

0 commit comments

Comments
 (0)