1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-03 18:17:55 +01:00

Merge pull request #7294 from weirdan/indent-heredoc

This commit is contained in:
Bruce Weirdan 2022-01-04 21:57:14 +02:00 committed by GitHub
commit 0cbce3977d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 202 additions and 202 deletions

View File

@ -143,51 +143,51 @@ final class LanguageServer
if (array_key_exists('h', $options)) {
echo <<<HELP
Usage:
psalm-language-server [options]
Usage:
psalm-language-server [options]
Options:
-h, --help
Display this help message
Options:
-h, --help
Display this help message
-v, --version
Display the Psalm version
-v, --version
Display the Psalm version
-c, --config=psalm.xml
Path to a psalm.xml configuration file. Run psalm --init to create one.
-c, --config=psalm.xml
Path to a psalm.xml configuration file. Run psalm --init to create one.
-r, --root
If running Psalm globally you'll need to specify a project root. Defaults to cwd
-r, --root
If running Psalm globally you'll need to specify a project root. Defaults to cwd
--find-dead-code
Look for dead code
--find-dead-code
Look for dead code
--clear-cache
Clears all cache files that the language server uses for this specific project
--clear-cache
Clears all cache files that the language server uses for this specific project
--use-ini-defaults
Use PHP-provided ini defaults for memory and error display
--use-ini-defaults
Use PHP-provided ini defaults for memory and error display
--tcp=url
Use TCP mode (by default Psalm uses STDIO)
--tcp=url
Use TCP mode (by default Psalm uses STDIO)
--tcp-server
Use TCP in server mode (default is client)
--tcp-server
Use TCP in server mode (default is client)
--disable-on-change[=line-number-threshold]
If added, the language server will not respond to onChange events.
You can also specify a line count over which Psalm will not run on-change events.
--disable-on-change[=line-number-threshold]
If added, the language server will not respond to onChange events.
You can also specify a line count over which Psalm will not run on-change events.
--enable-autocomplete[=BOOL]
Enables or disables autocomplete on methods and properties. Default is true.
--enable-autocomplete[=BOOL]
Enables or disables autocomplete on methods and properties. Default is true.
--use-extended-diagnostic-codes
Enables sending help uri links with the code in diagnostic messages.
--use-extended-diagnostic-codes
Enables sending help uri links with the code in diagnostic messages.
--verbose
Will send log messages to the client with information.
--verbose
Will send log messages to the client with information.
HELP;
HELP;
exit;
}

View File

@ -1180,162 +1180,162 @@ final class Psalm
private static function getHelpText(): string
{
return <<<HELP
Usage:
psalm [options] [file...]
Usage:
psalm [options] [file...]
Basic configuration:
-c, --config=psalm.xml
Path to a psalm.xml configuration file. Run psalm --init to create one.
Basic configuration:
-c, --config=psalm.xml
Path to a psalm.xml configuration file. Run psalm --init to create one.
--use-ini-defaults
Use PHP-provided ini defaults for memory and error display
--use-ini-defaults
Use PHP-provided ini defaults for memory and error display
--memory-limit=LIMIT
Use a specific memory limit. Cannot be combined with --use-ini-defaults
--memory-limit=LIMIT
Use a specific memory limit. Cannot be combined with --use-ini-defaults
--disable-extension=[extension]
Used to disable certain extensions while Psalm is running.
--disable-extension=[extension]
Used to disable certain extensions while Psalm is running.
--threads=INT
If greater than one, Psalm will run analysis on multiple threads, speeding things up.
--threads=INT
If greater than one, Psalm will run analysis on multiple threads, speeding things up.
--no-diff
Turns off Psalms diff mode, checks all files regardless of whether theyve changed.
--no-diff
Turns off Psalms diff mode, checks all files regardless of whether theyve changed.
--php-version=PHP_VERSION
Explicitly set PHP version to analyse code against.
--php-version=PHP_VERSION
Explicitly set PHP version to analyse code against.
Surfacing issues:
--show-info[=BOOLEAN]
Show non-exception parser findings (defaults to false).
Surfacing issues:
--show-info[=BOOLEAN]
Show non-exception parser findings (defaults to false).
--show-snippet[=true]
Show code snippets with errors. Options are 'true' or 'false'
--show-snippet[=true]
Show code snippets with errors. Options are 'true' or 'false'
--find-dead-code[=auto]
--find-unused-code[=auto]
Look for unused code. Options are 'auto' or 'always'. If no value is specified, default is 'auto'
--find-dead-code[=auto]
--find-unused-code[=auto]
Look for unused code. Options are 'auto' or 'always'. If no value is specified, default is 'auto'
--find-unused-psalm-suppress
Finds all @psalm-suppress annotations that arent used
--find-unused-psalm-suppress
Finds all @psalm-suppress annotations that arent used
--find-references-to=[class|method|property]
Searches the codebase for references to the given fully-qualified class or method,
where method is in the format class::methodName
--find-references-to=[class|method|property]
Searches the codebase for references to the given fully-qualified class or method,
where method is in the format class::methodName
--no-suggestions
Hide suggestions
--no-suggestions
Hide suggestions
--taint-analysis
Run Psalm in taint analysis mode see https://psalm.dev/docs/security_analysis for more info
--taint-analysis
Run Psalm in taint analysis mode see https://psalm.dev/docs/security_analysis for more info
--dump-taint-graph=OUTPUT_PATH
Output the taint graph using the DOT language requires --taint-analysis
--dump-taint-graph=OUTPUT_PATH
Output the taint graph using the DOT language requires --taint-analysis
Issue baselines:
--set-baseline=PATH
Save all current error level issues to a file, to mark them as info in subsequent runs
Issue baselines:
--set-baseline=PATH
Save all current error level issues to a file, to mark them as info in subsequent runs
Add --include-php-versions to also include a list of PHP extension versions
Add --include-php-versions to also include a list of PHP extension versions
--use-baseline=PATH
Allows you to use a baseline other than the default baseline provided in your config
--use-baseline=PATH
Allows you to use a baseline other than the default baseline provided in your config
--ignore-baseline
Ignore the error baseline
--ignore-baseline
Ignore the error baseline
--update-baseline
Update the baseline by removing fixed issues. This will not add new issues to the baseline
--update-baseline
Update the baseline by removing fixed issues. This will not add new issues to the baseline
Add --include-php-versions to also include a list of PHP extension versions
Add --include-php-versions to also include a list of PHP extension versions
Plugins:
--plugin=PATH
Executes a plugin, an alternative to using the Psalm config
Plugins:
--plugin=PATH
Executes a plugin, an alternative to using the Psalm config
Output:
-m, --monochrome
Enable monochrome output
Output:
-m, --monochrome
Enable monochrome output
--output-format=console
Changes the output format.
Available formats: compact, console, text, emacs, json, pylint, xml, checkstyle, junit, sonarqube, github,
phpstorm, codeclimate
--output-format=console
Changes the output format.
Available formats: compact, console, text, emacs, json, pylint, xml, checkstyle, junit, sonarqube,
github, phpstorm, codeclimate
--no-progress
Disable the progress indicator
--no-progress
Disable the progress indicator
--long-progress
Use a progress indicator suitable for Continuous Integration logs
--long-progress
Use a progress indicator suitable for Continuous Integration logs
--stats
Shows a breakdown of Psalms ability to infer types in the codebase
--stats
Shows a breakdown of Psalms ability to infer types in the codebase
Reports:
--report=PATH
The path where to output report file. The output format is based on the file extension.
(Currently supported formats: ".json", ".xml", ".txt", ".emacs", ".pylint", ".console",
".sarif", "checkstyle.xml", "sonarqube.json", "codeclimate.json", "summary.json", "junit.xml")
Reports:
--report=PATH
The path where to output report file. The output format is based on the file extension.
(Currently supported formats: ".json", ".xml", ".txt", ".emacs", ".pylint", ".console",
".sarif", "checkstyle.xml", "sonarqube.json", "codeclimate.json", "summary.json", "junit.xml")
--report-show-info[=BOOLEAN]
Whether the report should include non-errors in its output (defaults to true)
--report-show-info[=BOOLEAN]
Whether the report should include non-errors in its output (defaults to true)
Caching:
--clear-cache
Clears all cache files that Psalm uses for this specific project
Caching:
--clear-cache
Clears all cache files that Psalm uses for this specific project
--clear-global-cache
Clears all cache files that Psalm uses for all projects
--clear-global-cache
Clears all cache files that Psalm uses for all projects
--no-cache
Runs Psalm without using cache
--no-cache
Runs Psalm without using cache
--no-reflection-cache
Runs Psalm without using cached representations of unchanged classes and files.
Useful if you want the afterClassLikeVisit plugin hook to run every time you visit a file.
--no-reflection-cache
Runs Psalm without using cached representations of unchanged classes and files.
Useful if you want the afterClassLikeVisit plugin hook to run every time you visit a file.
--no-file-cache
Runs Psalm without using caching every single file for later diffing.
This reduces the space Psalm uses on disk and file I/O.
--no-file-cache
Runs Psalm without using caching every single file for later diffing.
This reduces the space Psalm uses on disk and file I/O.
Miscellaneous:
-h, --help
Display this help message
Miscellaneous:
-h, --help
Display this help message
-v, --version
Display the Psalm version
-v, --version
Display the Psalm version
-i, --init [source_dir=src] [level=3]
Create a psalm config file in the current directory that points to [source_dir]
at the required level, from 1, most strict, to 8, most permissive.
-i, --init [source_dir=src] [level=3]
Create a psalm config file in the current directory that points to [source_dir]
at the required level, from 1, most strict, to 8, most permissive.
--debug
Debug information
--debug
Debug information
--debug-by-line
Debug information on a line-by-line level
--debug-by-line
Debug information on a line-by-line level
--debug-emitted-issues
Print a php backtrace to stderr when emitting issues.
--debug-emitted-issues
Print a php backtrace to stderr when emitting issues.
-r, --root
If running Psalm globally youll need to specify a project root. Defaults to cwd
-r, --root
If running Psalm globally youll need to specify a project root. Defaults to cwd
--generate-json-map=PATH
Generate a map of node references and types in JSON format, saved to the given path.
--generate-json-map=PATH
Generate a map of node references and types in JSON format, saved to the given path.
--generate-stubs=PATH
Generate stubs for the project and dump the file in the given path
--generate-stubs=PATH
Generate stubs for the project and dump the file in the given path
--shepherd[=host]
Send data to Shepherd, Psalms GitHub integration tool.
--shepherd[=host]
Send data to Shepherd, Psalms GitHub integration tool.
--alter
Run Psalter
--alter
Run Psalter
--language-server
Run Psalm Language Server
--language-server
Run Psalm Language Server
HELP;
HELP;
}
}

View File

@ -112,63 +112,63 @@ final class Psalter
if (array_key_exists('h', $options)) {
echo <<<HELP
Usage:
psalter [options] [file...]
Usage:
psalter [options] [file...]
Options:
-h, --help
Display this help message
Options:
-h, --help
Display this help message
--debug, --debug-by-line, --debug-emitted-issues
Debug information
--debug, --debug-by-line, --debug-emitted-issues
Debug information
-c, --config=psalm.xml
Path to a psalm.xml configuration file. Run psalm --init to create one.
-c, --config=psalm.xml
Path to a psalm.xml configuration file. Run psalm --init to create one.
-m, --monochrome
Enable monochrome output
-m, --monochrome
Enable monochrome output
-r, --root
If running Psalm globally you'll need to specify a project root. Defaults to cwd
-r, --root
If running Psalm globally you'll need to specify a project root. Defaults to cwd
--plugin=PATH
Executes a plugin, an alternative to using the Psalm config
--plugin=PATH
Executes a plugin, an alternative to using the Psalm config
--dry-run
Shows a diff of all the changes, without making them
--dry-run
Shows a diff of all the changes, without making them
--safe-types
Only update PHP types when the new type information comes from other PHP types,
as opposed to type information that just comes from docblocks
--safe-types
Only update PHP types when the new type information comes from other PHP types,
as opposed to type information that just comes from docblocks
--php-version=PHP_MAJOR_VERSION.PHP_MINOR_VERSION
--php-version=PHP_MAJOR_VERSION.PHP_MINOR_VERSION
--issues=IssueType1,IssueType2
If any issues can be fixed automatically, Psalm will update the codebase. To fix as many issues as possible,
use --issues=all
--issues=IssueType1,IssueType2
If any issues can be fixed automatically, Psalm will update the codebase. To fix as many issues as
possible, use --issues=all
--list-supported-issues
Display the list of issues that psalter knows how to fix
--list-supported-issues
Display the list of issues that psalter knows how to fix
--find-unused-code
Include unused code as a candidate for removal
--find-unused-code
Include unused code as a candidate for removal
--threads=INT
If greater than one, Psalm will run analysis on multiple threads, speeding things up.
--threads=INT
If greater than one, Psalm will run analysis on multiple threads, speeding things up.
--codeowner=[codeowner]
You can specify a GitHub code ownership group, and only that owner's code will be updated.
--codeowner=[codeowner]
You can specify a GitHub code ownership group, and only that owner's code will be updated.
--allow-backwards-incompatible-changes=BOOL
Allow Psalm modify method signatures that could break code outside the project. Defaults to true.
--allow-backwards-incompatible-changes=BOOL
Allow Psalm modify method signatures that could break code outside the project. Defaults to true.
--add-newline-between-docblock-annotations=BOOL
Whether to add or not add a new line between docblock annotations. Defaults to true.
--add-newline-between-docblock-annotations=BOOL
Whether to add or not add a new line between docblock annotations. Defaults to true.
--no-cache
Runs Psalm without using cache
--no-cache
Runs Psalm without using cache
HELP;
HELP;
exit;
}

View File

@ -122,37 +122,37 @@ final class Refactor
if (array_key_exists('h', $options)) {
echo <<<HELP
Usage:
psalm-refactor [options] [symbol1] into [symbol2]
Usage:
psalm-refactor [options] [symbol1] into [symbol2]
Options:
-h, --help
Display this help message
Options:
-h, --help
Display this help message
--debug, --debug-by-line, --debug-emitted-issues
Debug information
--debug, --debug-by-line, --debug-emitted-issues
Debug information
-c, --config=psalm.xml
Path to a psalm.xml configuration file. Run psalm --init to create one.
-c, --config=psalm.xml
Path to a psalm.xml configuration file. Run psalm --init to create one.
-r, --root
If running Psalm globally you'll need to specify a project root. Defaults to cwd
-r, --root
If running Psalm globally you'll need to specify a project root. Defaults to cwd
--threads=auto
If greater than one, Psalm will run analysis on multiple threads, speeding things up.
By default
--threads=auto
If greater than one, Psalm will run analysis on multiple threads, speeding things up.
By default
--move "[Identifier]" --into "[Class]"
Moves the specified item into the class. More than one item can be moved into a class
by passing a comma-separated list of values e.g.
--move "[Identifier]" --into "[Class]"
Moves the specified item into the class. More than one item can be moved into a class
by passing a comma-separated list of values e.g.
--move "Ns\Foo::bar,Ns\Foo::baz" --into "Biz\Bang\DestinationClass"
--move "Ns\Foo::bar,Ns\Foo::baz" --into "Biz\Bang\DestinationClass"
--rename "[Identifier]" --to "[NewIdentifier]"
Renames a specified item (e.g. method) and updates all references to it that Psalm can
identify.
--rename "[Identifier]" --to "[NewIdentifier]"
Renames a specified item (e.g. method) and updates all references to it that Psalm can
identify.
HELP;
HELP;
exit;
}