Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a property to Squiz.Commenting.FunctionComment to skip processing for {@inheritdoc} (issue #2770) #3051

Merged
merged 4 commits into from Jan 19, 2021

Conversation

xjm
Copy link
Contributor

@xjm xjm commented Aug 12, 2020

#2770 and numerous previous closed issues have requested supporting {@inheritdoc} for function comments. This PR adds an optional property to the sniff that skips erroring on missing @param, @return, or @throws if the whole contents of the docblock are exactly {@inheritdoc} (case-insensitive).

Example usage:

    <rule ref="Squiz.Commenting.FunctionComment">                               
        <properties>
            <property name="skipIfInheritdoc" value="true"/>
        </properties>
    </rule>

@gsherwood gsherwood added this to Idea Bank in PHPCS v3 Development via automation Jan 18, 2021
@gsherwood gsherwood added this to the 3.6.0 milestone Jan 18, 2021
gsherwood added a commit that referenced this pull request Jan 19, 2021
gsherwood added a commit that referenced this pull request Jan 19, 2021
@gsherwood gsherwood merged commit e5afcb2 into squizlabs:master Jan 19, 2021
PHPCS v3 Development automation moved this from Idea Bank to Ready for Release Jan 19, 2021
@gsherwood
Copy link
Member

Thanks a lot for this new sniff property. This will be released in 3.6.0 and is documented here: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Customisable-Sniff-Properties#squizcommentingfunctioncomment

PavelSavushkinMix added a commit to PavelSavushkinMix/PHP_CodeSniffer that referenced this pull request Jan 17, 2022


It's supported to use {@inheritdoc}. Add a support of @inheritdoc (w/ brackets).
Original PR number - squizlabs#3051

Closes squizlabs#2770
PavelSavushkinMix added a commit to PavelSavushkinMix/PHP_CodeSniffer that referenced this pull request Jan 17, 2022


It's supported to use {@inheritdoc}. Add support of @inheritdoc (w/o brackets).
Original PR number - squizlabs#3051

Closes squizlabs#2770
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
PHPCS v3 Development
Ready for Release
Development

Successfully merging this pull request may close these issues.

None yet

2 participants