summaryrefslogtreecommitdiff
path: root/system-admin-guide
diff options
context:
space:
mode:
authorPetr Kovar <pkovar@redhat.com>2019-08-04 21:32:35 +0200
committerPetr Kovář <pknbe@volny.cz>2019-08-05 20:30:42 +0000
commit061bcc9af91d0c2f2c6867eec6cbb1ae54ccc552 (patch)
tree4ee8bb6a8ad21f2d65fce9546eba9739e0263832 /system-admin-guide
parent1b193335a6e54ef7d3d53517e8b89538101a762a (diff)
downloadgnome-user-docs-061bcc9af91d0c2f2c6867eec6cbb1ae54ccc552.tar.gz
Add schematron checks to CI for gnome-help & system-admin-guide
Wrap yelp-check tests in the shell script since they don't emit desired exit codes. Also, remove unused a11y-feature.page.tmpl.
Diffstat (limited to 'system-admin-guide')
-rw-r--r--system-admin-guide/C/system-admin-guide.sct33
1 files changed, 33 insertions, 0 deletions
diff --git a/system-admin-guide/C/system-admin-guide.sct b/system-admin-guide/C/system-admin-guide.sct
new file mode 100644
index 00000000..54af7060
--- /dev/null
+++ b/system-admin-guide/C/system-admin-guide.sct
@@ -0,0 +1,33 @@
+<?run this:
+xmllint --noout --schematron gnome-help.sct *.page 2>&1 | grep -v 'validates$'
+?>
+<schema xmlns="http://www.ascc.net/xml/schematron" >
+ <title>Some sanity checks for the GNOME desktop help</title>
+ <ns prefix="mal" uri="http://projectmallard.org/1.0/"/>
+ <ns prefix="xi" uri="http://www.w3.org/2001/XInclude"/>
+ <pattern name="Info element checks">
+ <rule context="mal:page/mal:info">
+ <assert test="not(mal:license)">Must not include license directly</assert>
+ <!-- FIXME: https://gitlab.gnome.org/GNOME/gnome-user-docs/issues/9
+ <assert test="xi:include[@href='legal.xml']">Must include legal.xml</assert>
+ -->
+ </rule>
+ </pattern>
+ <pattern name="Desc checks">
+ <rule context="mal:page/mal:info">
+ <assert test="normalize-space(mal:desc) != ''">Must have non-empty desc</assert>
+ </rule>
+ <rule context="mal:page/mal:info/mal:desc">
+ <assert test="mal:link or
+ substring(normalize-space(.), string-length(normalize-space(.))) = '.' or
+ mal:link or
+ substring(normalize-space(.), string-length(normalize-space(.))) = '?'"
+ >Desc must end with a period or question mark</assert>
+ </rule>
+ <rule context="mal:page/mal:info/mal:desc/mal:link">
+ <assert test="substring(normalize-space(..), string-length(normalize-space(..)) - 2) = '...' or
+ substring(normalize-space(..), string-length(normalize-space(..))) = '…'"
+ >Desc with links must end with an ellipsis</assert>
+ </rule>
+ </pattern>
+</schema>