Skip to content
Snippets Groups Projects
Commit 5c58a01a authored by Fawwaz Anugrah Wiradhika Dharmasatya's avatar Fawwaz Anugrah Wiradhika Dharmasatya
Browse files

fix: nocheck not working if there are decorator

parent 1eadb074
No related merge requests found
...@@ -44,10 +44,14 @@ class FileReader: ...@@ -44,10 +44,14 @@ class FileReader:
else: else:
continue continue
# Tentukan parent node ini # Tentukan parent node ini
parent = self.cfg_generator.generate(curr_node).ast.parent parent = self.cfg_generator.generate(curr_node).ast.parent.parent
print(parent)
print(parent.parent)
# Kasih keterangan tambahan ke konteks modul/fungsi yang merupakan parent fungsi ini. # Kasih keterangan tambahan ke konteks modul/fungsi yang merupakan parent fungsi ini.
for route in project_info.route_class: for route in project_info.route_class:
print(route.cfg.ast)
if route.location==file and (CFG.is_node_equal(route.cfg.ast,parent) or CFG.is_node_equal(route.cfg.ast,parent.parent)): if route.location==file and (CFG.is_node_equal(route.cfg.ast,parent) or CFG.is_node_equal(route.cfg.ast,parent.parent)):
print("masuk")
route.context.append(f"Exempt::{curr_node.name.split('(')[0]}") route.context.append(f"Exempt::{curr_node.name.split('(')[0]}")
elif("@ACL" in annotation): elif("@ACL" in annotation):
# Ini kelas acl # Ini kelas acl
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment