diff options
author | Billy Donahue <billy.donahue@mongodb.com> | 2020-10-09 20:50:38 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-10-13 19:30:17 +0000 |
commit | ff37b70553dbfd0b2aaeabb8a29c4d492507a9d3 (patch) | |
tree | 728b9266de70d79901eed31b0e39de0abc78cf24 /buildscripts/linter | |
parent | bbe604a5b3f94f78a30a76941ea89c0ca5db14d2 (diff) | |
download | mongo-ff37b70553dbfd0b2aaeabb8a29c4d492507a9d3.tar.gz |
SERVER-50917 util/ctype.h to replace <cctype> & <ctype.h> funcs
Diffstat (limited to 'buildscripts/linter')
-rw-r--r-- | buildscripts/linter/simplecpplint.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/buildscripts/linter/simplecpplint.py b/buildscripts/linter/simplecpplint.py index a1cd50f94d3..e0b3e4a04e2 100644 --- a/buildscripts/linter/simplecpplint.py +++ b/buildscripts/linter/simplecpplint.py @@ -126,6 +126,7 @@ class Linter: self._check_for_nonmongo_assert(linenum) self._check_for_mongo_unstructured_log(linenum) self._check_for_mongo_config_header(linenum) + self._check_for_ctype(linenum) # Relax the rule of commenting generic FCV references for files directly related to FCV # implementations. @@ -216,6 +217,12 @@ class Linter: linenum, 'mongodb/unstructuredlog', 'Illegal use of unstructured logging, ' 'this is only for local development use and should not be committed.') + def _check_for_ctype(self, linenum): + line = self.clean_lines[linenum] + if 'include <cctype>' in line or 'include <ctype.h>' in line: + self._error(linenum, 'mongodb/ctype', + 'Use of prohibited <ctype.h> or <cctype> header, use "mongo/util/ctype.h"') + def _check_for_server_side_public_license(self, copyright_offset): license_header = '''\ * This program is free software: you can redistribute it and/or modify |