Debian Codegraph @

share/nagelfar/syntaxdb_modulerc.tcl

raw
1 #
2 # SYNTAXDB_MODULERC.tcl, Nagelfar syntax database to lint modulercs
3 # Copyright (C) 2022-2026 Xavier Delaruelle
4 #
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 ##########################################################################
19
20 lappend ::knownGlobals {*}{
21 ModulesCurrentModulefile
22 ModulesVersion
23 ModuleTool
24 ModuleToolVersion
25 }
26 lappend ::knownCommands {*}{
27 hide-modulefile
28 hide-version
29 is-loaded
30 is-used
31 lsb-release
32 module-alias
33 module-forbid
34 module-hide
35 module-info
36 module-tag
37 module-version
38 module-virtual
39 module-warn
40 modulepath-ignore
41 modulepath-label
42 system
43 uname
44 versioncmp
45 }
46
47 # syntax
48 set ::syntax(hide-modulefile) 1
49 set ::syntax(hide-version) 1
50 set ::syntax(is-loaded) x*
51 set ::syntax(is-used) x*
52 set ::syntax(lsb-release) s
53 set ::syntax(module-alias) 2
54 # module-forbid accepts option at any position
55 set ::syntax(module-forbid) {p* x p* x* p*}
56 # module-hide accepts option at any position
57 set ::syntax(module-hide) {o* x o* x* o*}
58 set ::syntax(module-info) {s x?}
59 set {::syntax(module-info alias)} 1
60 set {::syntax(module-info command)} x?
61 set {::syntax(module-info loaded)} 1
62 set {::syntax(module-info mode)} x?
63 set {::syntax(module-info name)} 0
64 set {::syntax(module-info shell)} x?
65 set {::syntax(module-info shelltype)} x?
66 set {::syntax(module-info specified)} 0
67 set {::syntax(module-info symbols)} 1
68 set {::syntax(module-info tags)} x?
69 set {::syntax(module-info type)} 0
70 set {::syntax(module-info usergroups)} x?
71 set {::syntax(module-info username)} x?
72 set {::syntax(module-info version)} 1
73 # module-tag accepts option at any position
74 set ::syntax(module-tag) {p* x p* x p* x* p*}
75 set ::syntax(module-version) {x x x*}
76 set ::syntax(module-virtual) 2
77 # module-warn accepts option at any position
78 set ::syntax(module-warn) {p* x p* x* p*}
79 set ::syntax(modulepath-ignore) {x x*}
80 set ::syntax(modulepath-label) 2
81 set ::syntax(system) {x x*}
82 set ::syntax(uname) s
83 set ::syntax(versioncmp) 2
84 # not implemented commands
85 set {::syntax(module-info flags)} 0
86 set {::syntax(module-info trace)} 0
87 set {::syntax(module-info tracepat)} 0
88 set {::syntax(module-info user)} x?
89
90 # return
91 set ::return(is-loaded) int
92 set ::return(is-used) int
93 set ::return(system) int
94 set ::return(versioncmp) int
95 set {::return(module-info flags)} int
96
97 # subCmd
98 set ::subCmd(lsb-release) {id release codename}
99 set ::subCmd(module-info) {alias command loaded mode name shell shelltype\
100 specified symbols tags type usergroups username version user trace\
101 tracepat flags}
102 set ::subCmd(uname) {sysname nodename domain release version machine}
103
104 # option
105 set ::option(module-forbid) {--user --group --not-user --not-group --after\
106 --before --message --nearly-message}
107 set {::option(module-forbid --user)} 1
108 set {::option(module-forbid --group)} 1
109 set {::option(module-forbid --not-user)} 1
110 set {::option(module-forbid --not-group)} 1
111 set {::option(module-forbid --after)} 1
112 set {::option(module-forbid --before)} 1
113 set ::option(module-hide) {--user --group --not-user --not-group --after\
114 --before --soft --hard --hidden-loaded}
115 set {::option(module-hide --user)} 1
116 set {::option(module-hide --group)} 1
117 set {::option(module-hide --not-user)} 1
118 set {::option(module-hide --not-group)} 1
119 set {::option(module-hide --after)} 1
120 set {::option(module-hide --before)} 1
121 set ::option(module-tag) {--user --group --not-user --not-group}
122 set {::option(module-tag --user)} 1
123 set {::option(module-tag --group)} 1
124 set {::option(module-tag --not-user)} 1
125 set {::option(module-tag --not-group)} 1
126 set ::option(module-warn) {--user --group --not-user --not-group --after\
127 --before --message}
128 set {::option(module-warn --user)} 1
129 set {::option(module-warn --group)} 1
130 set {::option(module-warn --not-user)} 1
131 set {::option(module-warn --not-group)} 1
132 set {::option(module-warn --after)} 1
133 set {::option(module-warn --before)} 1
134
135 # vim:set tabstop=3 shiftwidth=3 expandtab autoindent: