Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-28465

Refactor eslint.py and clang_format.py

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.5
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Epic Link:
    • Sprint:
      Platforms 2017-04-17

      Description

      The clang_format.py and eslint.py scripts share a lot of code. These have large amounts of duplicate code including the Repo class for using git, and the parallel_process function.

      This code should be de-duplicated and moved into separate python modules.

      Proposed Layout:
      buildscripts/linters/

      • __init__.py
      • git.py - Repo class and related functions
      • parallel - Parallel Process function

      An example of why code de-duplication is bad is that the Repo class has diverged between these two files, and they now have different features.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mark.benvenuto Mark Benvenuto
              Reporter:
              mark.benvenuto Mark Benvenuto
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: