[SERVER-25737] ESLint and clang-format "lint-patch" modes can miss files with uppercase characters Created: 22/Aug/16  Updated: 19/Nov/16  Resolved: 19/Sep/16

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.3.14

Type: Task Priority: Major - P3
Reporter: Kamran K. Assignee: Michael Grundy
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: TIG 2016-09-19
Participants:

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

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


 Comments   
Comment by Githook User [ 19/Sep/16 ]

Author:

{u'username': u'mgrundy', u'name': u'Mike Grundy', u'email': u'michael.grundy@10gen.com'}

Message: SERVER-25737 ESLint and clang-format "lint-patch" modes can miss files with uppercase characters
Branch: master
https://github.com/mongodb/mongo/commit/e25b86e5617b2c50ca8b5b3e2f8c19bdef5d8ba5

Generated at Thu Feb 08 04:10:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.