•  
      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
    14101
    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-29 16:32
      • Status changed from Reopen to Closed
      • Close date set to 2019-05-29
    • User avatar
      gerrit #14894 integrated into Tuleap 11.1.99.12
    • User avatar
      gerrit #14886 integrated into bot-mattermost-git plugin
    • User avatar
      Thomas Gerbet (tgerbet)2019-05-03 13:46
      Patch to fix those 3 errors under review here: gerrit #14894.
    • User avatar
      gerrit #14885 integrated into TTM plugin
    • 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
    • User avatar
      • Status changed from Under review to Closed
      • Connected artifacts
      • Close date set to 2019-05-02
    • User avatar
      gerrit #14835 integrated into Tuleap 11.1.99.6
    • User avatar
      Thomas Gerbet (tgerbet)2019-05-02 11:13
      A patch is under review: gerrit #14835.

      • Status changed from Under implementation to Under review