[SERVER-54475] cpplint SSPL check dies of Python exception on very short files Created: 11/Feb/21 Updated: 29/Oct/23 Resolved: 12/Feb/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Billy Donahue | Assignee: | Billy Donahue |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Sprint: | Service Arch 2021-02-22 | ||||||||
| Participants: | |||||||||
| Description |
|
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 -
Side fix: when the linter throws, we should report the filename that failed regardless. |
| Comments |
| Comment by Githook User [ 12/Feb/21 ] |
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: simplecpplint.py Add '-present' year range suffix to copyright notice in a few c++ files. |
| Comment by Billy Donahue [ 12/Feb/21 ] |
| Comment by Andrew Morrow (Inactive) [ 11/Feb/21 ] |
|
We should first fix the linter to not crash and give a good message on these files, and then add the SSPL to the files it flags. |