Skip to content

Commit 98cc69b

Browse files
committed
docs: --implicit-check-not option
1 parent 17d133a commit 98cc69b

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

docs/06-options.rst

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Options
22
=======
33

4-
strict-whitespace
5-
-----------------
4+
--strict-whitespace
5+
-------------------
66

77
When the ``--strict-whitespace`` option is not provided, FileCheck ignores
88
differences between spaces and tabs. Additionally multiple spaces are ignored
@@ -27,8 +27,8 @@ will pass on any of the following inputs:
2727
2828
Adding ``--strict-whitespace`` disables this behavior.
2929

30-
match-full-lines
31-
----------------
30+
--match-full-lines
31+
------------------
3232

3333
When the ``--match-full-lines`` option is not provided, FileCheck does not
3434
match full lines.
@@ -76,8 +76,8 @@ Notice absence of spaces between ``CHECK:`` and the lines.
7676
$ echo $?
7777
0
7878
79-
check-prefix
80-
------------
79+
--check-prefix
80+
--------------
8181

8282
The ``--check-prefix`` option allows changing a default match keyword `CHECK`
8383
to an arbitrary keyword. This is useful when you want to test different behavior
@@ -92,3 +92,27 @@ in the same file:
9292
9393
One usual case is testing of how a program behaves when it is run with or
9494
without a specific option.
95+
96+
--implicit-check-not
97+
--------------------
98+
99+
The ``--implicit-check-not`` option adds implicit `CHECK-NOT` check that works
100+
on every input line.
101+
102+
FileCheck.py follows LLVM FileCheck in the following implementation details:
103+
104+
- The implicit checks are substring-matched i.e. their are ``in`` checks, not
105+
``==`` checks.
106+
- The implicit checks are case sensitive, so ``error`` check will not match
107+
``ERROR`` in the input.
108+
- The implicit check has lower priority than the positive `CHECK*` checks,
109+
but it has higher priority than negative `CHECK-NOT` checks.
110+
- To provide multiple implicit checks, duplicate the argument
111+
``--implicit-check-not <your check>`` multiple times.
112+
113+
Example
114+
~~~~~~~
115+
116+
A very useful application of this option is to add implicit
117+
``--implicit-check-not error --implicit-check-not warning`` checks to make sure
118+
that the input never has lines that contain ``error`` or ``warning`` in them.

0 commit comments

Comments
 (0)