1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cc: add file style selector to clang-format

This commit is contained in:
prime31 2020-02-01 17:51:27 -08:00 committed by GitHub
parent 8bd17c8016
commit f0efb42a30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,7 @@ fn (v mut V) cc() {
ends_with_js := v.out_name.ends_with('.js')
if v.pref.is_pretty_c && !ends_with_js {
format_result := os.exec('clang-format -i "$v.out_name_c"') or {
format_result := os.exec('clang-format -i -style=file "$v.out_name_c"') or {
eprintln('clang-format not found')
os.Result{exit_code:-1}
}