10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 896a85b commit f7b04e8Copy full SHA for f7b04e8
tool/auto-style.rb
@@ -233,10 +233,11 @@ def with_clean_env
233
234
if File.fnmatch?("*.[ch]", f, File::FNM_PATHNAME) &&
235
!DIFFERENT_STYLE_FILES.any? {|pat| File.fnmatch?(pat, f, File::FNM_PATHNAME)}
236
+ orig = src.dup
237
src.gsub!(/^\w+\([^(\n)]*?\)\K[ \t]*(?=\{$)/ 6159 , "\n")
238
src.gsub!(/^([ \t]*)\}\K[ \t]*(?=else\b)/, "\n" '\1')
239
src.gsub!(/^[ \t]*\}\n\K\n+(?=[ \t]*else\b)/, '')
- indent = indent0 = true
240
+ indent = indent0 = src != orig
241
end
242
243
if trailing0 or eofnewline0 or expandtab0 or indent0
0 commit comments