diff --git a/tools/chplcheck/src/chplcheck.py b/tools/chplcheck/src/chplcheck.py index e160a43c45d9..5aeafea7b03b 100755 --- a/tools/chplcheck/src/chplcheck.py +++ b/tools/chplcheck/src/chplcheck.py @@ -263,13 +263,8 @@ def main(): printed_warning = False - prev_context = None for filename, context in chapel.files_with_contexts(args.filenames): - # Avoid re-setting module paths on already-used contexts, due to - # bucketing from files_with_contexts. - if context is not prev_context: - context.set_module_paths([], []) - prev_context = context + context.set_module_paths([], []) # Silence errors, warnings etc. -- we're just linting. with context.track_errors() as _: