Skip to content

Commit

Permalink
Merge pull request #7294 from weirdan/indent-heredoc
Browse files Browse the repository at this point in the history
  • Loading branch information
weirdan committed Jan 4, 2022
2 parents f5dc2ee + 0c13d8e commit 0cbce39
Show file tree
Hide file tree
Showing 4 changed files with 202 additions and 202 deletions.
62 changes: 31 additions & 31 deletions src/Psalm/Internal/Cli/LanguageServer.php
Expand Up @@ -143,51 +143,51 @@ function (string $arg) use ($valid_long_options): void {

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;
}
Expand Down
220 changes: 110 additions & 110 deletions src/Psalm/Internal/Cli/Psalm.php
Expand Up @@ -1180,162 +1180,162 @@ private static function generateStubs(
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 Psalm’s diff mode, checks all files regardless of whether they’ve changed.
--no-diff
Turns off Psalm’s diff mode, checks all files regardless of whether they’ve 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 aren’t used
--find-unused-psalm-suppress
Finds all @psalm-suppress annotations that aren’t 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 Psalm’s ability to infer types in the codebase
--stats
Shows a breakdown of Psalm’s 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 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
--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, Psalm’s GitHub integration tool.
--shepherd[=host]
Send data to Shepherd, Psalm’s GitHub integration tool.
--alter
Run Psalter
--alter
Run Psalter
--language-server
Run Psalm Language Server
--language-server
Run Psalm Language Server
HELP;
HELP;
}
}

0 comments on commit 0cbce39

Please sign in to comment.