Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
config: can ignore test annexing
Browse files Browse the repository at this point in the history
  • Loading branch information
marsninja committed Sep 5, 2024
1 parent deacf5e commit ad17cc4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jaclang/compiler/passes/main/import_pass.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import jaclang.compiler.absyntree as ast
from jaclang.compiler.passes import Pass
from jaclang.compiler.passes.main import SubNodeTabPass, SymTabBuildPass
from jaclang.settings import settings
from jaclang.utils.log import logging


Expand Down Expand Up @@ -105,7 +106,7 @@ def annex_impl(self, node: ast.Module) -> None:
or test_folder == os.path.dirname(cur_file)
) and cur_file.endswith(".test.jac"):
mod = self.import_jac_mod_from_file(cur_file)
if mod:
if mod and not settings.ignore_test_annex:
node.test_mod.append(mod)
node.add_kids_right([mod], pos_update=False)
mod.parent = node
Expand Down
1 change: 1 addition & 0 deletions jaclang/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class Settings:

# Compiler configuration
diable_mtllm: bool = False
ignore_test_annex: bool = False

# Formatter configuration
max_line_length: int = 88
Expand Down

0 comments on commit ad17cc4

Please sign in to comment.