From 5b1ac056eb6129e3aadb1d44b1d5653bdbce59c5 Mon Sep 17 00:00:00 2001 From: David Speck Date: Fri, 30 Jun 2023 14:02:55 +0200 Subject: [PATCH] improved dump_plan option and excluded cudd from style checking --- misc/style/run-all-style-checks.py | 2 +- misc/style/run-uncrustify.py | 2 +- src/search/symbolic/plan_selection/plan_selector.cc | 2 +- src/search/symbolic/plan_selection/unordered_selector.cc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/style/run-all-style-checks.py b/misc/style/run-all-style-checks.py index 94a634767..e4c535b29 100755 --- a/misc/style/run-all-style-checks.py +++ b/misc/style/run-all-style-checks.py @@ -45,7 +45,7 @@ def check_cc_files(): Currently, we only check that there is no "std::" in .cc files. """ search_dir = os.path.join(SRC_DIR, "search") - cc_files = utils.get_src_files(search_dir, (".cc",)) + cc_files = utils.get_src_files(search_dir, (".cc",), ignore_dirs=["cudd-3.0.0"]) print("Checking style of {} *.cc files".format(len(cc_files))) return subprocess.call(["./check-cc-file.py"] + cc_files, cwd=DIR) == 0 diff --git a/misc/style/run-uncrustify.py b/misc/style/run-uncrustify.py index 7b53d7976..ca9289c28 100755 --- a/misc/style/run-uncrustify.py +++ b/misc/style/run-uncrustify.py @@ -41,7 +41,7 @@ def main(): args = parse_args() if not args.force and args.modify and search_files_are_dirty(): sys.exit(f"Error: {SEARCH_DIR} has uncommited changes.") - src_files = utils.get_src_files(SEARCH_DIR, (".h", ".cc")) + src_files = utils.get_src_files(SEARCH_DIR, (".h", ".cc"), ignore_dirs=["cudd-3.0.0"]) print(f"Checking {len(src_files)} files with uncrustify.") config_file = os.path.join(REPO, ".uncrustify.cfg") executable = "uncrustify" diff --git a/src/search/symbolic/plan_selection/plan_selector.cc b/src/search/symbolic/plan_selection/plan_selector.cc index 9d0054ce0..865e33b06 100644 --- a/src/search/symbolic/plan_selection/plan_selector.cc +++ b/src/search/symbolic/plan_selection/plan_selector.cc @@ -144,7 +144,7 @@ void PlanSelector::save_accepted_plan(const Plan &plan) { num_accepted_plans++; if (dump_plans) { - utils::g_log << endl << "Plan " << num_accepted_plans << ":" << endl; + utils::g_log << endl << "New plan " << num_accepted_plans << ":" << endl; } plan_mgr.save_plan(plan, state_registry->get_task_proxy(), dump_plans, num_desired_plans > 1); } diff --git a/src/search/symbolic/plan_selection/unordered_selector.cc b/src/search/symbolic/plan_selection/unordered_selector.cc index 15aa38271..a779f9b36 100644 --- a/src/search/symbolic/plan_selection/unordered_selector.cc +++ b/src/search/symbolic/plan_selection/unordered_selector.cc @@ -35,7 +35,7 @@ void UnorderedSelector::save_accepted_plan(const Plan &ordered_plan, const Plan num_accepted_plans++; if (dump_plans) { - utils::g_log << endl << "Ordered plan " << num_accepted_plans << ":" << endl; + utils::g_log << endl << "New plan " << num_accepted_plans << ":" << endl; } plan_mgr.save_plan(ordered_plan, state_registry->get_task_proxy(), dump_plans, num_desired_plans > 1); }