我用 PHP-cs Fixer 安装了 SublimeLinter 和 PHP-cs,我收到了一些警告和一些错误,但我想忽略它们。
2:1 error phpcs: error Missing file doc comment
11:1 error phpcs: error Missing doc comment for class ProductController
13:12 error phpcs: error Missing doc comment for function __construct()
18:12 error phpcs: error Missing doc comment for function index()
23:12 error phpcs: error Missing doc comment for function show()
28:12 error phpcs: error Missing doc comment for function create()
34:12 error phpcs: error Missing doc comment for function store()
71:90 warning phpcs: warning Line exceeds 85 characters; contains 90 characters
84:12 error phpcs: error Missing doc comment for function edit()
89:94 warning phpcs: warning Line exceeds 85 characters; contains 94 characters
91:12 error phpcs: error Missing doc comment for function update()
93:16 error phpcs: error Opening parenthesis of a multi-line function call must be the last content on the line
102:10 error phpcs: error Closing parenthesis of a multi-line function call must be on a line by itself
125:90 warning phpcs: warning Line exceeds 85 characters; contains 90 characters
136:12 error phpcs: error Missing doc comment for function destroy()
我尝试了一些排除嗅探,但没有任何反应,这很烦人。存在任何解决方案吗?
也许93:16
并102:10
获得自动缩进,但忽略它是可以的。
我的.phpcsfixer
<?php
return PhpCsFixer\Config::create()
->setRules(
[
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'no_unused_imports' => true
]
);
和我的 Linter 配置
"linters": {
"phpcs": {
"@disable": true,
"args": [],
"excludes": [
"*.blade.php"
],
"standard": ""
}
},
谢谢大家。