Explorar el Código

Add markdown and URL check

Billy Barrow hace 1 mes
padre
commit
6da0aede14
Se han modificado 2 ficheros con 11 adiciones y 0 borrados
  1. 1 0
      MANIFEST.usm
  2. 10 0
      src/cli/Manifest.vala

+ 1 - 0
MANIFEST.usm

@@ -13,6 +13,7 @@
     "gir:usm-1.0.gir": "as-expected",
     "pc:usm.pc": "as-expected",
     "res:slopdocs/structure.usm.manifest.md": "source:slopdocs/structure.usm.manifest.md",
+    "res:slopdocs/utility.usm.manifest.validate.md": "source:slopdocs/utility.usm.manifest.validate.md",
     "res:slopdocs/structure.usm.manifest.packaging.md": "source:slopdocs/structure.usm.manifest.packaging.md",
     "res:slopdocs/utility.usm.manifest.autoprovides.md": "source:slopdocs/utility.usm.manifest.autoprovides.md",
     "res:slopdocs/structure.usm.manifest.resource-types.md": "source:slopdocs/structure.usm.manifest.resource-types.md",

+ 10 - 0
src/cli/Manifest.vala

@@ -853,6 +853,16 @@ private int validate() {
         printerr("Warning: No licence has been provided in the manifest.\n");
     }
 
+    // Check for markdown
+    if(manifest.markdown_path == null) {
+        printerr("Warning: No markdown description has been provided in the manifest.\n");
+    }
+
+    // Check for url
+    if(manifest.url == null) {
+        printerr("Warning: No URL has been provided in the manifest.\n");
+    }
+
     try {
         // Run build
         var build_proc = manifest.run_build(build_path, paths, SubprocessFlags.STDOUT_SILENCE, frac => printerr(@"Building '$(manifest.name)': $((int)(frac*100))%\r"));