tests: add a syntax-check rule for glnx_prefix_error()
authorColin Walters <walters@verbum.org>
Fri, 23 Jun 2017 20:26:44 +0000 (16:26 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 26 Jun 2017 15:09:12 +0000 (15:09 +0000)
Same as the errno variant; the colon-space `: ` thing got me in a different
patch.

Closes: #956
Approved by: jlebon

cfg.mk
src/libostree/ostree-repo-commit.c

diff --git a/cfg.mk b/cfg.mk
index b4ffaf5f55fdccb33433c5455af3db2a5027247a..f6f1ce25c691b1e28d138e10646308d40adc85be 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -23,6 +23,10 @@ local-checks-to-skip = \
     sc_prohibit_path_max_allocation \
     sc_trailing_blank \
 
+sc_glnx_prefix_error_colon:
+       @prohibit='\<glnx_prefix_error *\(.*: ",' halt="don't add trailing : for glnx_prefix_error"     \
+         $(_sc_search_regexp)
+
 sc_glnx_errno_prefix_colon:
        @prohibit='\<glnx_throw_errno_prefix *\(.*: ",' halt="don't add trailing : for glnx_throw_errno_prefix" \
          $(_sc_search_regexp)
index 45b5bc6e8b803d616de379ad3d25746db59d1e0b..cf6d90e71d7f748aa4497303c11cbb64cadac69a 100644 (file)
@@ -762,7 +762,7 @@ write_content_object (OstreeRepo         *self,
                                     uid, gid, mode,
                                     xattrs, temp_fd,
                                     cancellable, error))
-    return glnx_prefix_error (error, "Writing object %s.%s", actual_checksum,
+    return glnx_prefix_error (error, "Writing object %s.%s", actual_checksum,
                               ostree_object_type_to_string (OSTREE_OBJECT_TYPE_FILE));
   /* Clear the unlinker path, it was consumed */
   tmp_unlinker.path = NULL;