@@ -702,6 +702,90 @@ cases:
702702 widget.cpp:6:23:T.Tok:'ZQX' in a doc comment
703703 widget.cpp:8:26:T.Tok:'ZQX' in a doc comment
704704
705+ - name : qdocinc-include
706+ about : " a `.qdocinc` is an include, not a file of comments: its markup is
707+ the body of one, so nothing waits for a `/*!` that the file never
708+ writes, and a `//! [name]` marker is still markup"
709+ files :
710+ .vale.ini : |
711+ StylesPath = styles
712+ MinAlertLevel = suggestion
713+
714+ [*.qdocinc]
715+ T.Tok = YES
716+ styles/T/Tok.yml : |
717+ extends: existence
718+ message: "'%s'"
719+ level: error
720+ nonword: true
721+ raw:
722+ - ZQX
723+ steps.qdocinc : |
724+ //! [intro]
725+ \note A ZQX in an included note.
726+ //! [intro]
727+
728+ A ZQX in an included paragraph.
729+ wrapped.qdocinc : |
730+ /*!
731+ A ZQX in an include that writes the comment out.
732+ */
733+ args : .
734+ exit : 1
735+ want : |
736+ steps.qdocinc:2:13:T.Tok:'ZQX'
737+ steps.qdocinc:5:3:T.Tok:'ZQX'
738+ wrapped.qdocinc:2:7:T.Tok:'ZQX'
739+
740+ - name : qdoc-meta-in-source
741+ about : " the same comment lints the same way wherever it is written: an
742+ image file name is `meta` in a C++ source as much as in a `.qdoc` file,
743+ so an ordinary rule passes over it and a `meta` rule reaches it"
744+ files :
745+ .vale.ini : |
746+ StylesPath = styles
747+ MinAlertLevel = suggestion
748+
749+ [formats]
750+ cpp = qdoc
751+
752+ [*.{qdoc,cpp}]
753+ T.Prose = YES
754+ T.Image = YES
755+ styles/T/Prose.yml : |
756+ extends: existence
757+ message: "'%s' as prose"
758+ level: error
759+ nonword: true
760+ raw:
761+ - ZQX
762+ styles/T/Image.yml : |
763+ extends: existence
764+ message: "'%s' in a file name"
765+ scope: meta.class.image
766+ level: error
767+ nonword: true
768+ raw:
769+ - ZQX
770+ same.qdoc : |
771+ /*!
772+ \image ZQX-diagram.png A caption with a ZQX in it.
773+ */
774+ widget.cpp : |
775+ #include "widget.h"
776+
777+ /*!
778+ \image ZQX-diagram.png A caption with a ZQX in it.
779+ */
780+ void Widget::clicked() {}
781+ args : .
782+ exit : 1
783+ want : |
784+ same.qdoc:2:12:T.Image:'ZQX' in a file name
785+ same.qdoc:2:45:T.Prose:'ZQX' as prose
786+ widget.cpp:4:12:T.Image:'ZQX' in a file name
787+ widget.cpp:4:45:T.Prose:'ZQX' as prose
788+
705789 - name : qml-fragments
706790 about : doc comments in QML sources lint as QDoc through `[formats]`;
707791 the QML code itself -- objects, bindings, functions, strings, line
0 commit comments