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

ESLint and clang-format "lint-patch" modes can miss files with uppercase characters

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.14
    • Component/s: Testing Infrastructure
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      TIG 2016-09-19

      Description

      buildscripts/eslint.py and buildscripts/clang_format.py use this regex to find modified files in a patch:

      r"^diff --git a\/([a-z\/\.\-_0-9]+) b\/[a-z\/\.\-_0-9]+"
      

      If one of your patched files contains an uppercase character and another one doesn't, then the one with the uppercase character will not get linted or formatted. (This bug can also cause all files to be formatted and linted if the only file in the patch contains an uppercase character.)

      Mathias Stearn debugged this issue locally.

      Steps to repro:

      1. Modify SConstruct locally and make sure it's the only modified file in your tree
      2. Invoke the upload.py script with the --check-eslint parameter to trigger a linting pass on all files

        Attachments

          Activity

            People

            Assignee:
            michael.grundy Michael Grundy
            Reporter:
            kamran.khan Kamran K.
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: