Skip to content

Add option to allow annotations in SlevomatCodingStandard.Commenting.DisallowCommentAfterCode #1766

Open
@jannes-io

Description

@jannes-io

Example:

PHP Unit's @codeCoverageIgnore must be placed directly behind the line it is referencing.

Does nothing:

            if ($elasticProperty === false) {
                // @codeCoverageIgnore
                continue;
            }

Actually ignores the like

            if ($elasticProperty === false) {
                continue; // @codeCoverageIgnore
            }

So I'm asking for the ability to whitelist annotations behind lines while blocking random "documentation" comments from being behind lines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions