-
Notifications
You must be signed in to change notification settings - Fork 126
/
windows-7-phpcs-fixer-linter.example
95 lines (67 loc) · 2.61 KB
/
windows-7-phpcs-fixer-linter.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{
// Example for:
// - Windows 7
// - With phpcs and php-cs-fixer support
// We want debugging on
"show_debug": true,
// Only execute the plugin for php files
"extensions_to_execute": ["php"],
// Do not execute for twig files
"extensions_to_blacklist": ["twig.php"],
// Execute the sniffer on file save
"phpcs_execute_on_save": true,
// Show the error list after save.
"phpcs_show_errors_on_save": true,
// Show the errors in the gutter
"phpcs_show_gutter_marks": true,
// Show outline for errors
"phpcs_outline_for_errors": true,
// Show the errors in the status bar
"phpcs_show_errors_in_status": true,
// Show the errors in the quick panel so you can then goto line
"phpcs_show_quick_panel": true,
// Path to php on windows installation
// This is needed as we cannot run phars on windows, so we run it through php
"phpcs_php_prefix_path": "C:\\Program Files (x86)\\PHP\\php.exe",
// We want the fixer to be run through the php application
"phpcs_commands_to_php_prefix": ["Fixer"],
// PHP_CodeSniffer settings
// Yes, run the phpcs command
"phpcs_sniffer_run": true,
// And execute it on save
"phpcs_command_on_save": true,
// This is the path to the bat file when we installed PHP_CodeSniffer
"phpcs_executable_path": "C:\\Program Files (x86)\\PHP\\PEAR\\phpcs.bat",
// I want to run the PSR2 standard, and ignore warnings
"phpcs_additional_args": {
"--standard": "PSR2",
"-n": ""
},
// PHP-CS-Fixer settings
// Don't want to auto fix issue with php-cs-fixer
"php_cs_fixer_on_save": false,
// Show the quick panel
"php_cs_fixer_show_quick_panel": true,
// The fixer phar file is stored here:
"php_cs_fixer_executable_path": "C:\\Program Files (x86)\\PHP\\PEAR\\php-cs-fixer.phar",
// Additional arguments, run all levels of fixing
"php_cs_fixer_additional_args": {
},
// PHP Linter settings
// Yes, lets lint the files
"phpcs_linter_run": true,
// And execute that on each file when saved (php only as per extensions_to_execute)
"phpcs_linter_command_on_save": true,
// Path to php
"phpcs_php_path": "C:\\Program Files (x86)\\PHP\\php.exe",
// This is the regex format of the errors
"phpcs_linter_regex": "(?P<message>.*) on line (?P<line>\\d+)",
// PHP Mess Detector settings
// Not turning on the mess detector here
"phpmd_run": false,
"phpmd_command_on_save": false,
"phpmd_executable_path": "",
"phpmd_additional_args": {
"codesize,naming,unusedcode": ""
}
}