•  
      request #13354 Make sure PHP annotations are correctly formatted and comments not completly useless
    Infos
    #13354
    Thomas Gerbet (tgerbet)
    2019-05-29 16:32
    2019-05-02 10:53
    14475
    Details
    Make sure PHP annotations are correctly formatted and comments not completly useless
    Playing a bit with static analysis tools those days, I encountered a few spots where an annotation was present to mark the variable type but was incorrectly formatted and as a result the tool does not pick up the hint.

    Also we have a non negligible quantity of comments that are not useful like comments telling you what's the name of a class (it's already in the code...) or when the file has been created (we have Git for that).


    We can clean up all of that and enforce it with coding standards rules.
    Dev tools
    Empty
    Empty
    • [ ] enhancement
    • [x] internal improvement
    Empty
    Stage
    Empty
    Closed
    2019-05-29
    Attachments
    Empty
    References

    Follow-ups

    User avatar
    Thomas Gerbet (tgerbet)2019-05-03 13:36
    Reopening, I miss 3 errors while re-formatting the whole codebase:
    FILE: src/common/Dashboard/AssetsIncluder.php
    ----------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 3 LINES
    ----------------------------------------------------------------------------------------------------------------------------
    74 | ERROR | Invalid inline documentation comment format "@var \Tuleap\Layout\BaseLayout", expected "@var type $variable".
    77 | ERROR | Invalid inline documentation comment format "@var \Tuleap\Layout\BaseLayout", expected "@var type $variable".
    85 | ERROR | Invalid inline documentation comment format "@var \Tuleap\Layout\BaseLayout", expected "@var type $variable".
    ----------------------------------------------------------------------------------------------------------------------------

    • Status changed from Closed to Reopen
    • Close date cleared