coding-standard icon indicating copy to clipboard operation
coding-standard copied to clipboard

README.md has become bloated

Open bkdotcom opened this issue 3 years ago • 6 comments

navigation currently consists only of

  1. Sniffs included in this standard

than "scrolls for miles"

Thoughts on breaking the sniffs into separate readme files?

Perhaps by "sniff category"?

  • Arrays
  • Classes
  • Commenting
  • Complexity
  • ControlStructures
  • Exceptions
  • Files
  • Functions
  • Namespaces
  • Numbers
  • Operators
  • PHP
  • TypeHints
  • Variables
  • Whitespaces

In favor of / in addition to "functional", "cleaning" & "formatting" ?

bkdotcom avatar Jul 12 '22 18:07 bkdotcom

Speaking of documentation: An "annotated" xml file that contains every available sniff with every option explicitly set would be helpful

bkdotcom avatar Jul 13 '22 19:07 bkdotcom

I’m ok to split the readme to more files (perhaps in “doc” directory) - based on the sniff category.

We can have only sniff names in the readme - as links to the new files.

kukulich avatar Jul 13 '22 19:07 kukulich

As a very happy but picky user of this coding standard, I am super glad for having all the detailed docs in single file. Makes it very easy to find what I am looking for.

vojtech-dobes avatar Jul 14 '22 06:07 vojtech-dobes

@vojtech-dobes

We can have only sniff names in the readme - as links to the new files.

Is this not sufficient?

kukulich avatar Jul 14 '22 06:07 kukulich

It's fine :)

vojtech-dobes avatar Jul 14 '22 07:07 vojtech-dobes

I’m ok to split the readme to more files (perhaps in “doc” directory) - based on the sniff category.

It would be nice to also think about my old issue https://github.com/slevomat/coding-standard/issues/62 :) There is a dead link and I cannot edit now, this is the right one UnnecessaryStringConcatStandard.xml.

What about something what will grab fixture files like backedEnumTypeSpacingErrors.php and backedEnumTypeSpacingErrors.fixed.php and create something similar like

<!-- SlevomatCodingStandard/Docs/Classes/BackedEnumTypeSpacingSniff.xml  -->

<documentation title="Backed Enum Type Spacing">
    <standard>
    <![CDATA[
    TBD
    ]]>
    </standard>
    <code_comparison>
        <code title="Valid">
        <![CDATA[
enum BackedInt: int
{

}

enum BackedString: string
{

}
        ]]>
        </code>
        <code title="Invalid>
        <![CDATA[
enum BackedInt :   int
{

}

enum BackedString   :string
{

}
        ]]>
        </code>
    </code_comparison>
</documentation>

o5 avatar Aug 18 '22 12:08 o5

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Nov 16 '22 00:11 github-actions[bot]