[SERVER-20850] clang-format patch build passed lint, but had an error that broke the build Created: 09/Oct/15  Updated: 14/Apr/16  Resolved: 04/Apr/16

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

Type: Bug Priority: Major - P3
Reporter: Geert Bosch Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Duplicate Votes: 0
Labels: clang-format
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-19986 clang-format.py lint fails in mci if ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

The patch at https://evergreen.mongodb.com/build/mongodb_mongo_master_linux_64_77b5a7cd3d8f95c411549c1342b6fb696e352adc_15_10_08_19_37_01
passed lint, but has en error that broke the lint check on master:

https://evergreen.mongodb.com/task/mongodb_mongo_master_enterprise_linux_64_amazon_ami_lint_e465af7b99fe2844a621ecb995f59f5f5316cf1d_15_10_09_15_07_21

My commit to fix it shows the exact formatting error that wasn't detected:

commit 177e91b765ae7b966bd17a0eadf80635b0417023
Author: Geert Bosch <geert@mongodb.com>
Date: Fri Oct 9 12:13:22 2015 -0400

SERVER-19521: Fix lint

diff --git a/src/mongo/dbtests/validate_tests.cpp b/src/mongo/dbtests/validate_tests.cpp
index 1175171..48ee3a8 100644
— a/src/mongo/dbtests/validate_tests.cpp
+++ b/src/mongo/dbtests/validate_tests.cpp
@@ -167,7 +167,7 @@ public:

{ WriteUnitOfWork wunit(&_txn); rs->deleteRecord(&_txn, id1); - wunit.commit(); + wunit.commit(); }

ASSERT_FALSE(checkValid());



 Comments   
Comment by Mark Benvenuto [ 12/Oct/15 ]

The issue is that clang-format.py gets the list of files to use from git via ls-files, and git-apply run by MCI does not add the file into the index.

https://github.com/mongodb/mongo/blob/master/buildscripts/clang_format.py#L473

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