File: lint-inline.rst

package info (click to toggle)
cmake-format 0.6.13-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,436 kB
  • sloc: python: 16,990; makefile: 14
file content (40 lines) | stat: -rw-r--r-- 792 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
=================
Inline Directives
=================

`cmake-lint` supports inline directives to help control local behavior. The
format of these directives is a cmake line comment with the following
format:

.. code::

  # cmake-lint: <body>

-------
Pragmas
-------

disable
=======

You may specify a list of error codes to locally disable. You may specify
a comma separate list of codes to disable:

.. code::

  # cmake-lint: disable=<code1>,<code2>,<code3>,...

Example:

.. code::

  # cmake-lint: disable=C0103
  foreach(LOOPVAR2 a b c d)
    # pass
  endforeach()

.. warning::

  Currently this pragma must be specified at body scope (e.g. it cannot be a
  comment within a statement) and it applies for the duration of the scope.
  This behavior will likely change in the future.