coding-standard
coding-standard copied to clipboard
README.md has become bloated
navigation currently consists only of
- Functional - improving the safety and behaviour of code
- Cleaning - detecting dead code
- Formatting - rules for consistent code looks
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" ?
Speaking of documentation: An "annotated" xml file that contains every available sniff with every option explicitly set would be helpful
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.
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
We can have only sniff names in the readme - as links to the new files.
Is this not sufficient?
It's fine :)
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>
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.