•  
      request #13292 Integrate vimeo/psalm to the test pipeline
    Infos
    #13292
    Thomas Gerbet (tgerbet)
    2019-07-19 11:00
    2019-04-23 15:14
    14161
    Details
    Integrate vimeo/psalm to the test pipeline
    This is the next stage of request #13038.

    Goal here is to be able to integrate and enforce Psalm checks in our test pipeline.
    Due to the resources needed to achieve the static analysis, we might be forced to only check modified files of each patchset which means we might miss changes affecting the unmodified parts of the codebase.


    This request will mostly be about the stabilization of what we already have, most issues/false positives are due to the way(s) Tuleap loads its classes and files, depending on the entry point you might encounter functions/classes that are not loaded but exist in the codebase. This does not help tools analyzing code at all.

    This request will also take care of solving issues spotted by Psalm introduced since we run Psalm in the nightly pipeline.

    We will also need to wait for the next release of Psalm (current release 3.2.9) to not have to work around some issues (e.g. [0])


    [0] https://github.com/vimeo/psalm/issues/1542
    Dev tools
    Empty
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Empty
    Closed
    2019-07-19
    Attachments
    References
    Referencing request #13292

    Git commit

    tuleap/tuleap/stable

    Make sure all FRS classes can be autoloaded c34e931284
    Make sure all TV3 classes can be autoloaded 0618b51d80
    Fix recent issues spotted by vimeo/psalm in the tracker plugin a2b4ad31c5
    Fix recent issues spotted by vimeo/psalm in the docman plugin 4d5b75f4ab
    Update vimeo/psalm to 3.2.12 84f8c3afa8
    Make sure Psalm knows how to access classes of the FlamingParrot theme 67aa3eb068
    Add Psalm verification in the test pipeline on modified files 7cd4581d5c
    Fix issues spotted by vimeo/psalm 6dd55d42d5
    Remove confusing issues recording of Psalm errors 828673c13d
    Update Psalm to 3.4.2 1d00f9ae8d
    Errors found by Psalm on the whole codebase fail the nightly build 42ac58a3db
    Update to Psalm 3.4.5 99e8ef79c8
    Fix remaining issues found after the upgrade to Psalm 3.4.5 1e544a169b
    Fix UndefinedClass and UndefinedDocblockClass found by Psalm in individual files 6adfbe8619
    Fix PossiblyUndefinedVariable issues found by Psalm in individual files edd2d07510
    Remove \get_server_url() function dd5849727b
    Remove \user_getid() function ec18077fa4
    Fix remaining issues found by Psalm when analyzing files individually bb9324b9a3

    Follow-ups

    User avatar
    gerrit #15459 (Remove \group_add_history() function) Integrated into Tuleap 11.3.99.172

    • Status changed from Under implementation to Closed
    • Connected artifacts
    • Close date set to 2019-07-19
    User avatar
    Thomas Gerbet (tgerbet)2019-06-24 09:51
    So to found the issues only visible when analyzing a part of the codebase, I have analyzed each file individually and consolidated all the reports. Result attached.

    User avatar
    Thomas Gerbet (tgerbet)2019-06-07 14:01
    The current state is not too bad, the integration in the CI tets pipeline works quite well. Before closing this I want to fix all the issue that are found only when a file is analyzed without the whole codebase. Those issues can be confusing for a contributor because they can be triggered on code section not touched or impacted by the contribution.