Skip to content

Document all the sniffs #434

Closed as not planned
Closed as not planned

Description

Is your feature request related to a problem?

There is no documentation for the sniffs. We can only reason about a sniff from a class name. Neither Wiki pages represents the destiny of the sniffs nor Sniff interface has a method like getDescription() or getDefinition() with code samples before/after.

Describe the solution you'd like

Add new method to the interface or maintain the Wiki.

Additional context (optional)

  • I intend to create a pull request to implement this feature.

Activity

  1. jrfnl commented on Apr 6, 2024

    @jrfnl
    Member

    @javaDeveloperKid No clue what you are trying to suggest here, but your basic premise seems ill-informed.

    The vast majority of PHPCS native sniffs have documentation and you can access the docs applicable to any standard via phpcs --generator=Text --standard=....

    There's a discussion going in #317 to see about also making this information accessible via a web interface or via the wiki.

  2. jrfnl commented on Apr 6, 2024

    @jrfnl
    Member

    @javaDeveloperKid I suggest you have a good read through the wiki and the help. All this info is available, though could possibly be better organized.

    I understand you are running into the differences between CS Fixer and PHPCS, but that doesn't mean that PHPCS should become CS Fixer.
    These tools have significant differences, both in technology as well as in philosophy and that's not going to change.

    I started using PHP CS Fixer when I was a junior developer and it was so easy. Now I'm senior and I've recently started using PHP Code Sniffer and it's not easy

    There are plenty of people for whom the opposite is true (confusion when going from PHPCS to CS-fixer), so put your preconceptions aside and give the tool a chance based on its own merits

  3. ghost closed this as not plannedon Apr 6, 2024
  4. jrfnl commented on Apr 13, 2024

    @jrfnl
    Member

    FYI: While it doesn't directly address this issue, PR #447 is a proposal to improve the help screens, including improved information on the help screen about finding documentation/rules for your ruleset.

    Reviews and testing of that PR would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions