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

cpplint SSPL check dies of Python exception on very short files

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Fully Compatible
    • ALL
    • Service Arch 2021-02-22

      I'm seeing ninja lint fail on the new 3-line "shim" files because they are so short that the license check is accessing an element past the end of the lines List. That can be "fixed" a few ways:

      including the license in those trivial comment only shim files.

      skipping the check for short files

      continuing to check them, but check the length first so they merely fail the check.

      Proposed fix:

      https://github.com/mongodb/mongo/compare/master...BillyDonahue:lint_crash

      -If something is less than 3 lines long, skip the SSPL disclaimer check.-
      Add the license everywhere.

       

      Side fix: when the linter throws, we should report the filename that failed regardless.

            Assignee:
            billy.donahue@mongodb.com Billy Donahue
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: