Skip to content

4.0 | Wiki/FAQ: remove text about warning for parse errors #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion wiki/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Coding standards are a good thing. They will improve the code readability and ma

## Does PHP_CodeSniffer parse my code to ensure it will execute?

No. PHP_CodeSniffer does not actually parse your code, and so cannot accurately tell if your code contains parse errors. PHP_CodeSniffer does know about some parse errors and will warn you if it finds code that it is unable to sniff correctly due to a suspected parse error. However, as there is no actual parsing taking place, PHP_CodeSniffer may return an incorrect number of errors when checking code that contains parse errors.
No. PHP_CodeSniffer does not actually parse your code, and so cannot accurately tell if your code contains parse errors. PHP_CodeSniffer does know about some parse errors and will attempt to silently ignore those. However, as there is no actual parsing taking place, PHP_CodeSniffer may return an incorrect number of errors when checking code that contains parse errors.

You can check for parse errors in a file using the PHP command line interface and the `-l` (lowercase L) option.

Expand Down
Loading