#include <tools/tools.h>
#include <ccan/talloc/talloc.h>
#include <ccan/str/str.h>
+#include <ccan/cast/cast.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
!= strlen(example->lines[i])
|| write(fd, "\n", 1) != 1) {
close(fd);
- return "Failure writing to temporary file";
+ return cast_const(char *,
+ "Failure writing to temporary file");
}
}
close(fd);
}
}
+ /* We don't fail ccanlint for this. */
+ score->pass = true;
if (have_info_example && have_header_example) {
score->score = score->total;
- score->pass = true;
return;
}
score_file_error(score, mainh, 0, "No Example: section");
score->score = have_info_example + have_header_example;
- /* We pass if we find any example. */
- score->pass = score->score != 0;
}
struct ccanlint examples_exist = {