Skip to content

Commit 11beacc

Browse files
authored
Use lowercase letter at the start of warnings/errors. NFC (#20928)
1 parent 5b8018d commit 11beacc

File tree

8 files changed

+20
-20
lines changed

8 files changed

+20
-20
lines changed

emcc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ def array_contains_any_of(hay, needles):
431431

432432
if array_contains_any_of(user_args, SIMD_INTEL_FEATURE_TOWER) or array_contains_any_of(user_args, SIMD_NEON_FLAGS):
433433
if '-msimd128' not in user_args and '-mrelaxed-simd' not in user_args:
434-
exit_with_error('Passing any of ' + ', '.join(SIMD_INTEL_FEATURE_TOWER + SIMD_NEON_FLAGS) + ' flags also requires passing -msimd128 (or -mrelaxed-simd)!')
434+
exit_with_error('passing any of ' + ', '.join(SIMD_INTEL_FEATURE_TOWER + SIMD_NEON_FLAGS) + ' flags also requires passing -msimd128 (or -mrelaxed-simd)!')
435435
cflags += ['-D__SSE__=1']
436436

437437
if array_contains_any_of(user_args, SIMD_INTEL_FEATURE_TOWER[1:]):
@@ -852,7 +852,7 @@ def phase_setup(options, state, newargs):
852852
# -fwasm-exceptions takes care of enabling them, so users aren't supposed to
853853
# pass them explicitly, regardless of their values
854854
if 'DISABLE_EXCEPTION_CATCHING' in user_settings or 'DISABLE_EXCEPTION_THROWING' in user_settings:
855-
diagnostics.warning('emcc', 'You no longer need to pass DISABLE_EXCEPTION_CATCHING or DISABLE_EXCEPTION_THROWING when using Wasm exceptions')
855+
diagnostics.warning('emcc', 'you no longer need to pass DISABLE_EXCEPTION_CATCHING or DISABLE_EXCEPTION_THROWING when using Wasm exceptions')
856856
settings.DISABLE_EXCEPTION_CATCHING = 1
857857
settings.DISABLE_EXCEPTION_THROWING = 1
858858

test/test_core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,12 +1576,12 @@ def clear_all_relevant_settings(self):
15761576
# test setting includes -Werror.
15771577
self.set_setting('DISABLE_EXCEPTION_THROWING', 1)
15781578
err = self.expect_fail([EMCC, test_file('hello_world.cpp'), '-fwasm-exceptions'] + self.get_emcc_args())
1579-
self.assertContained('error: You no longer need to pass DISABLE_EXCEPTION_CATCHING or DISABLE_EXCEPTION_THROWING when using Wasm exceptions', err)
1579+
self.assertContained('error: you no longer need to pass DISABLE_EXCEPTION_CATCHING or DISABLE_EXCEPTION_THROWING when using Wasm exceptions', err)
15801580
clear_all_relevant_settings(self)
15811581

15821582
self.set_setting('DISABLE_EXCEPTION_CATCHING', 1)
15831583
err = self.expect_fail([EMCC, test_file('hello_world.cpp'), '-fwasm-exceptions'] + self.get_emcc_args())
1584-
self.assertContained('error: You no longer need to pass DISABLE_EXCEPTION_CATCHING or DISABLE_EXCEPTION_THROWING when using Wasm exceptions', err)
1584+
self.assertContained('error: you no longer need to pass DISABLE_EXCEPTION_CATCHING or DISABLE_EXCEPTION_THROWING when using Wasm exceptions', err)
15851585
clear_all_relevant_settings(self)
15861586

15871587
# Emscripten SjLj and Wasm EH cannot mix

test/test_other.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6260,7 +6260,7 @@ def test_define_modularize(self):
62606260

62616261
def test_EXPORT_NAME_with_html(self):
62626262
err = self.expect_fail([EMCC, test_file('hello_world.c'), '-o', 'a.html', '-sEXPORT_NAME=Other'])
6263-
self.assertContained('Customizing EXPORT_NAME requires that the HTML be customized to use that name', err)
6263+
self.assertContained('error: customizing EXPORT_NAME requires that the HTML be customized to use that name', err)
62646264

62656265
def test_modularize_sync_compilation(self):
62666266
create_file('post.js', r'''

test/test_sanity.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def make_new_executable(name):
218218
output = self.do(command)
219219

220220
if 'blah' in settings:
221-
self.assertContained('Error in evaluating config file (%s)' % default_config, output)
221+
self.assertContained('error: error in evaluating config file (%s)' % default_config, output)
222222
elif 'runner' not in ' '.join(command):
223223
self.assertContained('error: NODE_JS is set to empty value', output) # sanity check should fail
224224
finally:
@@ -362,7 +362,7 @@ def test_em_config_env_var(self):
362362
with env_modify({'EM_CONFIG': get_basic_config()}):
363363
out = self.expect_fail([EMCC, 'main.cpp', '-Wno-deprecated', '-o', 'a.out.js'])
364364

365-
self.assertContained('error: Inline EM_CONFIG data no longer supported. Please use a config file.', out)
365+
self.assertContained('error: inline EM_CONFIG data no longer supported. Please use a config file.', out)
366366

367367
def clear_cache(self):
368368
self.run_process([EMCC, '--clear-cache'])

tools/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def parse_config_file():
117117
try:
118118
exec(config_text, config)
119119
except Exception as e:
120-
exit_with_error('Error in evaluating config file (%s): %s, text: %s', EM_CONFIG, str(e), config_text)
120+
exit_with_error('error in evaluating config file (%s): %s, text: %s', EM_CONFIG, str(e), config_text)
121121

122122
CONFIG_KEYS = (
123123
'NODE_JS',
@@ -288,7 +288,7 @@ def init():
288288

289289
# We used to support inline EM_CONFIG.
290290
if '\n' in EM_CONFIG:
291-
exit_with_error('Inline EM_CONFIG data no longer supported. Please use a config file.')
291+
exit_with_error('inline EM_CONFIG data no longer supported. Please use a config file.')
292292

293293
EM_CONFIG = os.path.expanduser(EM_CONFIG)
294294

tools/js_optimizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def run_on_file(filename, passes, extra_info=None):
163163
end_funcs = js.rfind(end_funcs_marker)
164164

165165
if start_funcs < 0 or end_funcs < start_funcs:
166-
shared.exit_with_error('Invalid input file. Did not contain appropriate markers. (start_funcs: %s, end_funcs: %s' % (start_funcs, end_funcs))
166+
shared.exit_with_error('invalid input file. Did not contain appropriate markers. (start_funcs: %s, end_funcs: %s' % (start_funcs, end_funcs))
167167

168168
minify_globals = 'minifyNames' in passes
169169
if minify_globals:

tools/link.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ def setup_environment_settings():
187187
(settings.ENVIRONMENT_MAY_BE_NODE and settings.PTHREADS)
188188

189189
if not settings.ENVIRONMENT_MAY_BE_WORKER and settings.PROXY_TO_WORKER:
190-
exit_with_error('If you specify --proxy-to-worker and specify a "-sENVIRONMENT=" directive, it must include "worker" as a target! (Try e.g. -sENVIRONMENT=web,worker)')
190+
exit_with_error('if you specify --proxy-to-worker and specify a "-sENVIRONMENT=" directive, it must include "worker" as a target! (Try e.g. -sENVIRONMENT=web,worker)')
191191

192192
if not settings.ENVIRONMENT_MAY_BE_WORKER and settings.SHARED_MEMORY:
193-
exit_with_error('When building with multithreading enabled and a "-sENVIRONMENT=" directive is specified, it must include "worker" as a target! (Try e.g. -sENVIRONMENT=web,worker)')
193+
exit_with_error('when building with multithreading enabled and a "-sENVIRONMENT=" directive is specified, it must include "worker" as a target! (Try e.g. -sENVIRONMENT=web,worker)')
194194

195195

196196
def embed_memfile(options):
@@ -797,7 +797,7 @@ def phase_linker_setup(options, state, newargs):
797797
# For a command we always want EXIT_RUNTIME=1
798798
# For a reactor we always want EXIT_RUNTIME=0
799799
if 'EXIT_RUNTIME' in user_settings:
800-
exit_with_error('Explicitly setting EXIT_RUNTIME not compatible with STANDALONE_WASM. EXIT_RUNTIME will always be True for programs (with a main function) and False for reactors (not main function).')
800+
exit_with_error('explicitly setting EXIT_RUNTIME not compatible with STANDALONE_WASM. EXIT_RUNTIME will always be True for programs (with a main function) and False for reactors (not main function).')
801801
settings.EXIT_RUNTIME = settings.EXPECT_MAIN
802802
settings.IGNORE_MISSING_MAIN = 0
803803
# the wasm must be runnable without the JS, so there cannot be anything that
@@ -928,7 +928,7 @@ def phase_linker_setup(options, state, newargs):
928928

929929
if 'CLOSURE_WARNINGS' in user_settings:
930930
if settings.CLOSURE_WARNINGS not in ['quiet', 'warn', 'error']:
931-
exit_with_error('Invalid option -sCLOSURE_WARNINGS=%s specified! Allowed values are "quiet", "warn" or "error".' % settings.CLOSURE_WARNINGS)
931+
exit_with_error('invalid option -sCLOSURE_WARNINGS=%s specified! Allowed values are "quiet", "warn" or "error".' % settings.CLOSURE_WARNINGS)
932932

933933
diagnostics.warning('deprecated', 'CLOSURE_WARNINGS is deprecated, use -Wclosure/-Wno-closure instread')
934934
closure_warnings = diagnostics.manager.warnings['closure']
@@ -1117,7 +1117,7 @@ def phase_linker_setup(options, state, newargs):
11171117
default_setting('NODEJS_CATCH_REJECTION', 0)
11181118
default_setting('NODEJS_CATCH_EXIT', 0)
11191119
if settings.NODEJS_CATCH_REJECTION or settings.NODEJS_CATCH_EXIT:
1120-
exit_with_error('Cannot use -sNODEJS_CATCH_REJECTION or -sNODEJS_CATCH_EXIT with -sMODULARIZE')
1120+
exit_with_error('cannot use -sNODEJS_CATCH_REJECTION or -sNODEJS_CATCH_EXIT with -sMODULARIZE')
11211121

11221122
setup_environment_settings()
11231123

@@ -2077,7 +2077,7 @@ def phase_final_emitting(options, state, target, wasm_target, memfile):
20772077
delete_file(memfile)
20782078

20792079
if settings.SPLIT_MODULE:
2080-
diagnostics.warning('experimental', 'The SPLIT_MODULE setting is experimental and subject to change')
2080+
diagnostics.warning('experimental', 'the SPLIT_MODULE setting is experimental and subject to change')
20812081
do_split_module(wasm_target, options)
20822082

20832083
if not settings.SINGLE_FILE:
@@ -2409,7 +2409,7 @@ def generate_traditional_runtime_html(target, options, js_target, target_basenam
24092409
if settings.EXPORT_NAME != 'Module' and options.shell_path == DEFAULT_SHELL_HTML:
24102410
# the minimal runtime shell HTML is designed to support changing the export
24112411
# name, but the normal one does not support that currently
2412-
exit_with_error('Customizing EXPORT_NAME requires that the HTML be customized to use that name (see https://github.com/emscripten-core/emscripten/issues/10086)')
2412+
exit_with_error('customizing EXPORT_NAME requires that the HTML be customized to use that name (see https://github.com/emscripten-core/emscripten/issues/10086)')
24132413

24142414
shell = shared.read_and_preprocess(options.shell_path)
24152415
if '{{{ SCRIPT }}}' not in shell:

tools/shared.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def get_finished_process():
218218
idx = get_finished_process()
219219
finished_process = processes.pop(idx)
220220
if finished_process.returncode != 0:
221-
exit_with_error('Subprocess %d/%d failed (%s)! (cmdline: %s)' % (idx + 1, len(commands), returncode_to_str(finished_process.returncode), shlex_join(commands[idx])))
221+
exit_with_error('subprocess %d/%d failed (%s)! (cmdline: %s)' % (idx + 1, len(commands), returncode_to_str(finished_process.returncode), shlex_join(commands[idx])))
222222
num_completed += 1
223223

224224
if route_stdout_to_temp_files_suffix:
@@ -411,7 +411,7 @@ def check_node():
411411
try:
412412
run_process(config.NODE_JS + ['-e', 'console.log("hello")'], stdout=PIPE)
413413
except Exception as e:
414-
exit_with_error('The configured node executable (%s) does not seem to work, check the paths in %s (%s)', config.NODE_JS, config.EM_CONFIG, str(e))
414+
exit_with_error('the configured node executable (%s) does not seem to work, check the paths in %s (%s)', config.NODE_JS, config.EM_CONFIG, str(e))
415415

416416

417417
def set_version_globals():
@@ -448,7 +448,7 @@ def perform_sanity_checks():
448448
with ToolchainProfiler.profile_block('sanity LLVM'):
449449
for cmd in [CLANG_CC, LLVM_AR]:
450450
if not os.path.exists(cmd) and not os.path.exists(cmd + '.exe'): # .exe extension required for Windows
451-
exit_with_error('Cannot find %s, check the paths in %s', cmd, config.EM_CONFIG)
451+
exit_with_error('cannot find %s, check the paths in %s', cmd, config.EM_CONFIG)
452452

453453

454454
@ToolchainProfiler.profile()

0 commit comments

Comments
 (0)