|
@@ -6,6 +6,7 @@
|
|
|
/// add a missing namespace tag to a module source file.
|
|
|
///
|
|
|
|
|
|
+virtual nsdeps
|
|
|
virtual report
|
|
|
|
|
|
@has_ns_import@
|
|
@@ -16,10 +17,15 @@ MODULE_IMPORT_NS(ns);
|
|
|
|
|
|
// Add missing imports, but only adjacent to a MODULE_LICENSE statement.
|
|
|
// That ensures we are adding it only to the main module source file.
|
|
|
-@do_import depends on !has_ns_import@
|
|
|
+@do_import depends on !has_ns_import && nsdeps@
|
|
|
declarer name MODULE_LICENSE;
|
|
|
expression license;
|
|
|
identifier virtual.ns;
|
|
|
@@
|
|
|
MODULE_LICENSE(license);
|
|
|
+ MODULE_IMPORT_NS(ns);
|
|
|
+
|
|
|
+// Dummy rule for report mode that would otherwise be empty and make spatch
|
|
|
+// fail ("No rules apply.")
|
|
|
+@script:python depends on report@
|
|
|
+@@
|