•  
      request #13708 Cleanup unused use statements and enforce it in the Tuleap PHP coding standards
    Infos
    #13708
    Thomas Gerbet (tgerbet)
    2019-12-30 14:44
    2019-08-01 17:26
    14901
    Details
    Cleanup unused use statements and enforce it in the Tuleap PHP coding standards
    So once again I got a contribution rejected [0] only because I have left a unused use statement. This sort of reviews are mostly useless and are a waste of time for both the reviewer ad the contributor.
    The reviewer should be focused on finding bugs, security issues or design flaws in the architecture (or anything that increase the code quality) not on things that have no impact (or so small it's hardly measurable) at the execution and that can not become an issue in the long term maintenance of the software.

    This request is introduce a sniff to catch the unused use statements early in the dev process and autofix them.
    This was already attempted in request #13068 but due to a bug in the sniff, it was reverted. The bug has been fixed but a release of slevomat/coding-standard has not yet been released with it. In the meantime I'm just going to pull the fixed sniff in our sources.



    [0] https://gerrit.tuleap.net/c/tuleap/+/15653/1
    Dev tools
    All
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Thomas Gerbet (tgerbet)
    Closed
    2019-12-30
    Attachments
    Empty
    References

    Follow-ups

    User avatar
    Thomas Gerbet (tgerbet)2019-08-02 17:17
    Can't really pull the sniff on its own, the recent changes made to it also require some new helpers. I will patiently wait for a release.

    • Status changed from Under implementation to Waiting for information