summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct18
-rw-r--r--etc/evergreen.yml12
2 files changed, 20 insertions, 10 deletions
diff --git a/SConstruct b/SConstruct
index 2a6e86f0711..3c407fab11f 100644
--- a/SConstruct
+++ b/SConstruct
@@ -4140,13 +4140,6 @@ incremental_link = Tool('incremental_link')
if incremental_link.exists(env):
incremental_link(env)
-def checkErrorCodes():
- import buildscripts.errorcodes as x
- if x.check_error_codes() == False:
- env.FatalError("next id to use: {0}", x.get_next_code())
-
-checkErrorCodes()
-
# Resource Files are Windows specific
def env_windows_resource_file(env, path):
if env.TargetOSIs('windows'):
@@ -4227,12 +4220,17 @@ lint_py = env.Command(
action="$PYTHON ${SOURCES[0]} lint",
)
-env.Alias( "lint" , [ lint_py, eslint, clang_format, pylinters ] )
-env.Alias( "lint-fast" , [ eslint, clang_format, pylinters ] )
+lint_errorcodes = env.Command(
+ target="#lint-errorcodes",
+ source=["buildscripts/errorcodes.py"],
+ action="$PYTHON ${SOURCES[0]} --quiet",
+)
+
+env.Alias( "lint" , [ lint_py, eslint, clang_format, pylinters, lint_errorcodes ] )
+env.Alias( "lint-fast" , [ eslint, clang_format, pylinters, lint_errorcodes ] )
env.AlwaysBuild( "lint" )
env.AlwaysBuild( "lint-fast" )
-
# ---- INSTALL -------
def getSystemInstallName():
diff --git a/etc/evergreen.yml b/etc/evergreen.yml
index 799a1117608..be19bb8e53c 100644
--- a/etc/evergreen.yml
+++ b/etc/evergreen.yml
@@ -4461,6 +4461,17 @@ tasks:
${activate_virtualenv}
find buildscripts etc jstests -name '*.y*ml' -exec yamllint -c etc/yamllint_config.yml {} +
+- name: lint_errorcodes
+ commands:
+ - command: manifest.load
+ - func: "git get project"
+ - func: "set task expansion macros"
+ - func: "set up virtualenv"
+ - func: "upload pip requirements"
+ - func: "scons lint"
+ vars:
+ targets: lint-errorcodes
+
- name: burn_in_tests_gen
commands:
- command: manifest.load
@@ -9862,6 +9873,7 @@ buildvariants:
- name: lint_cpplint
- name: lint_fuzzer_sanity_patch
- name: lint_yaml
+ - name: lint_errorcodes
- name: burn_in_tests_gen
- name: burn_in_tests_multiversion_gen
- name: .aggfuzzer