File: lint-notes.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 (57 lines) | stat: -rw-r--r-- 1,062 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
============
Linter notes
============

.. default-role:: literal
.. highlight:: none

---------------------------
Variable naming conventions
---------------------------

The default patterns used for variable naming convention is chosen to match
the dominant convention of the listfiles distributed with cmake itself. The
tool `analyze_naming.py` was used to classify each variable assignment in
all modules from cmake `3.10` yielding the following counts::

  PARENT
  ======
  other: 237
  '[A-Z][A-Z0-9_]+' 335
  '[a-z][a-z0-9_]+' 146
  '_[A-Z0-9_]+' 62
  '_[a-z0-9_]+' 236

  LOCAL
  =====
  other: 375
  '[A-Z][A-Z0-9_]+' 646
  '[a-z][a-z0-9_]+' 1220
  '_[A-Z0-9_]+' 375
  '_[a-z0-9_]+' 450

  DIRECTORY
  =========
  other: 235
  '[A-Z][A-Z0-9_]+' 2140
  '[a-z][a-z0-9_]+' 111
  '_[A-Z0-9_]+' 515
  '_[a-z0-9_]+' 182

  LOOP
  ====
  other: 72
  '[A-Z][A-Z0-9_]+' 98
  '[a-z][a-z0-9_]+' 288
  '_[A-Z0-9_]+' 79
  '_[a-z0-9_]+' 114

  ARGUMENT
  ========
  other: 17
  '[A-Z][A-Z0-9_]+' 159
  '[a-z][a-z0-9_]+' 512
  '_[A-Z0-9_]+' 60
  '_[a-z0-9_]+' 184