[SERVER-28465] Refactor eslint.py and clang_format.py Created: 23/Mar/17  Updated: 12/Apr/17  Resolved: 28/Mar/17

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 3.5.5

Type: Task Priority: Major - P3
Reporter: Mark Benvenuto Assignee: Mark Benvenuto
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-28308 Integrate python linting for IDL into... Closed
Backwards Compatibility: Fully Compatible
Sprint: Platforms 2017-04-17
Participants:

 Description   

The clang_format.py and eslint.py scripts share a lot of code. These have large amounts of duplicate code including the Repo class for using git, and the parallel_process function.

This code should be de-duplicated and moved into separate python modules.

Proposed Layout:
buildscripts/linters/

  • __init__.py
  • git.py - Repo class and related functions
  • parallel - Parallel Process function

An example of why code de-duplication is bad is that the Repo class has diverged between these two files, and they now have different features.



 Comments   
Comment by Githook User [ 12/Apr/17 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-28465 Only run eslint on js files
Branch: master
https://github.com/mongodb/mongo/commit/80d05e9359bc527da0bc150d7aeac5a83d546775

Comment by Githook User [ 28/Mar/17 ]

Author:

{u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}

Message: SERVER-28465: Refactor eslint.py and clang_format.py
Branch: master
https://github.com/mongodb/mongo/commit/00ee4f5156348477b9dd3f71b747104794f766c0

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