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

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.14
    • Affects Version/s: None
    • Component/s: Testing Infrastructure
    • None
    • Fully Compatible
    • TIG 2016-09-19

      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.)

      redbeard0531 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

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

              Created:
              Updated:
              Resolved: