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

@deprecated without @see tag false positive #162

Closed
ihor-sviziev opened this issue Dec 11, 2019 · 0 comments
Closed

@deprecated without @see tag false positive #162

ihor-sviziev opened this issue Dec 11, 2019 · 0 comments
Labels
bug Something isn't working false positive Rule causes false positive findings Progress: done

Comments

@ihor-sviziev
Copy link
Collaborator

ihor-sviziev commented Dec 11, 2019

Description

Originally this issue appeared here: magento/magento2#21235 (comment)

Run static tests against following file:

https://github.com/magento/magento2/blob/5b829a847852f9bcd5ea66d751e0454f33fa3716/app/code/Magento/Customer/Model/Customer.php#L64-L68

Right now you're getting following message:

PHP Code Sniffer detected 1 violation(s): 

FILE: /var/www/html/app/code/Magento/Customer/Model/Customer.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 68 | WARNING | Motivation behind the added @deprecated tag MUST be
    |         | explained. @see tag MUST be used with reference to
    |         | new implementation when code is deprecated and there
    |         | is a new alternative.
----------------------------------------------------------------------



Failed asserting that 1 matches expected 0.

As we can see here - there is @see tag:
image

Expected behavior

You should not have any complains

Benefits

Additional information

@ihor-sviziev ihor-sviziev added the enhancement Improvements to existing rules label Dec 11, 2019
@lenaorobei lenaorobei added bug Something isn't working false positive Rule causes false positive findings Progress: ready for dev and removed enhancement Improvements to existing rules labels Dec 11, 2019
@sinisa86 sinisa86 self-assigned this Apr 4, 2020
sinisa86 added a commit to sinisa86/magento-coding-standard that referenced this issue Apr 4, 2020
sinisa86 added a commit to sinisa86/magento-coding-standard that referenced this issue Apr 28, 2020
lenaorobei added a commit to sinisa86/magento-coding-standard that referenced this issue Sep 2, 2020
lenaorobei added a commit that referenced this issue Sep 2, 2020
#162 Modified @deprecated validator to consider it valid if comment is absent but @see tag is set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working false positive Rule causes false positive findings Progress: done
Projects
None yet
Development

No branches or pull requests

3 participants