Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

pun explain

Explain a rule.

Explain a rule: its summary, group, sets, fix safety, upstream names and docs link.

Usage

pun explain <rule>
pun explain lint/style/no-alias-function   # Pun ID
pun explain style/no-alias-function        # without the command
pun explain no_alias_functions             # upstream name

What happens

  • Finds the rule by Pun ID, short ID, or upstream name.
  • For an upstream or old name, prints the Pun ID first.
  • Prints the rule’s details.
$ pun explain no_alias_functions
`no_alias_functions` is `lint/style/no-alias-function` in Pun.

lint/style/no-alias-function
Master functions shall be used instead of aliases.

group     style: One consistent way to write the same thing
sets      coding-style
fix       unsafe
upstream  no_alias_functions (php-cs-fixer)
          no-alias-function (mago-linter)
docs      https://punphp.com/docs/rules/lint/style/no-alias-function

fix is safe, unsafe, mixed (safe only where types prove it) or none.

Exit codes

Code Meaning
0 Printed.
2 Unknown or unsupported rule.

Last updated on

Was this page helpful?