Skip to content

Commit c993a13

Browse files
authored
Merge pull request #53 from DrWursterich/feature/allow_risky
Add option for --allow-risky
2 parents 62d8205 + ff535bf commit c993a13

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ let g:php_cs_fixer_config = "default" " options: --config
2828
let g:php_cs_fixer_rules = "@PSR2" " options: --rules (default:@PSR2)
2929
"let g:php_cs_fixer_cache = ".php_cs.cache" " options: --cache-file
3030
"let g:php_cs_fixer_config_file = '.php_cs' " options: --config
31+
let g:php_cs_fixer_allow_risky = "yes" " options: --allow-risky
3132
" End of php-cs-fixer version 2 config params
3233
3334
let g:php_cs_fixer_php_path = "php" " Path to PHP

autoload/php_cs_fixer.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ endif
5454
if exists('g:php_cs_fixer_cache')
5555
let g:php_cs_fixer_command = g:php_cs_fixer_command . ' --cache-file=' . g:php_cs_fixer_cache
5656
endif
57+
58+
if exists('g:php_cs_fixer_allow_risky') && g:php_cs_fixer_version >= 2
59+
let g:php_cs_fixer_command = g:php_cs_fixer_command . ' --allow-risky=' . g:php_cs_fixer_allow_risky
60+
endif
5761
"}}}
5862

5963
fun! php_cs_fixer#Fix(path, dry_run)

0 commit comments

Comments
 (0)