sublime-phpcs를 구성하려고했습니다. 배를 설치했고 문서화 된 설치 절차를 사용하여 PHP_CodeSniffer 및 PHPMD 명령 줄을 설치했습니다. PHP와 배는 내 경로 인 d :/Program Files/xampp/php 및 d :/Program Files/xampp/php/pear에 있으며 디렉토리 외부에서 사용할 수 있습니다. 필자는 PHPCodeSniffer, PHPMD 및 showdebug를 사용자 설정 파일에서 true로 설정했지만 저장시 아무 것도 강조 표시되지 않거나 윤곽선이 표시되지 않으며 콘솔에서만 오류를 볼 수 있습니다.Sublime-phpcs - PHP MD 및 CS 패키지가 제대로 작동하지 않습니다.
[Phpcs] phpcs --report=checkstyle --standard=PSR2 -n D:\htdocs\ubc\app\main\source\plugins\project\core\class-cse-meta-boxes.php
[Phpcs] phpcs --report=checkstyle --standard=PSR2 -n D:\htdocs\ubc\app\main\source\plugins\project\core\class-cse-meta-boxes.php
[Phpcs] cwd: C:\Users\mtpultz
Exception in thread Thread-183:
Traceback (most recent call last):
File "X/subprocess.py", line 1090, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "X/threading.py", line 639, in _bootstrap_inner
File "X/threading.py", line 596, in run
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 433, in run
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 139, in get_errors
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 215, in execute
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 218, in parse_report
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 169, in shell_out
File "X/subprocess.py", line 818, in __init__
File "X/subprocess.py", line 1096, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified
모든 설치 후 서버를 다시 시작한 후 서브 텍스트를 다시 열었습니다.
업데이트 Sergey의 도움을 받아 사용자 설정에 대한 phpcs 실행 경로가 추가되었습니다.
[Phpcs] phpmd D:\htdocs\ubc\app\main\source\plugins\ubc\core\class-cse-meta-boxes.php text codesize,unusedcode,naming
[Phpcs] phpmd D:\htdocs\ubc\app\main\source\plugins\ubc\core\class-cse-meta-boxes.php text codesize,unusedcode,naming
[Phpcs] cwd: C:\Users\mtpultz
Exception in thread Thread-183:
Traceback (most recent call last):
File "X/subprocess.py", line 1090, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "X/threading.py", line 639, in _bootstrap_inner
File "X/threading.py", line 596, in run
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 435, in run
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 139, in get_errors
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 311, in execute
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 314, in parse_report
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 169, in shell_out
File "X/subprocess.py", line 818, in __init__
File "X/subprocess.py", line 1096, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified
사용자 설정에 phpmd 실행 파일 경로가 추가 세르게이의 도움에 대한 응답으로 업데이트 2 .
[Phpcs] D:\Program Files\xampp\php\pear\phing\tasks\ext\phpmd D:\htdocs\ubc\app\main\source\plugins\ubc-petrography\core\class-cse-meta-boxes.php text codesize,unusedcode,naming
[Phpcs] D:\Program Files\xampp\php\pear\phing\tasks\ext\phpmd D:\htdocs\ubc\app\main\source\plugins\ubc-petrography\core\class-cse-meta-boxes.php text codesize,unusedcode,naming
[Phpcs] cwd: C:\Users\mtpultz
Exception in thread Thread-18:
Traceback (most recent call last):
File "X/subprocess.py", line 1090, in _execute_child
PermissionError: [WinError 5] Access is denied
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "X/threading.py", line 639, in _bootstrap_inner
File "X/threading.py", line 596, in run
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 435, in run
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 139, in get_errors
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 311, in execute
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 314, in parse_report
File "phpcs in C:\Users\mtpultz\AppData\Roaming\Sublime Text 3\Installed Packages\Phpcs.sublime-package", line 169, in shell_out
File "X/subprocess.py", line 818, in __init__
File "X/subprocess.py", line 1096, in _execute_child
PermissionError: [WinError 5] Access is denied
누구든지이 문제가 있습니까?
안녕, 나는 phpcs_executable_path 변경에 "D : \\ 프로그램 파일 \\ XAMPP \\ PHP \\ phpcs.bat"당신이 언급 한 것처럼, 그리고 기본 설정에서 또한 발견 phpcs_php_path, 그리고 D를 추가 : \\ 프로그램 파일 \\ xampp \\ php에 사용자 설정에서. 그건 분명히 oversite 내 부분에있어,하지만 난 여전히 같은 오류 및 PHP 오류 알림을 받고 있어요. – mtpultz
@mtpultz'phpcs_php_path'가 없으면'phpcs_executable_path'를 추가하지 않고 시작해 봅시다. 오, 안돼. 또한''show_debug ': true'를 추가해야합니다. 내 코드 목록을 업데이트했습니다. 위 참조. –
안녕하세요, 알았습니다. 이제 공허한 오류 목록이 숭고한 콘솔에 나타납니다. 편집기에서 선 표시기 나 강조 표시가 없으며 하단의 오류 메시지가 변경되었습니다. 변경 사항을 반영하도록 질문을 수정했습니다. – mtpultz