| 1 |
# |
| 2 |
# SYNTAXDB_MODULERC.tcl, Nagelfar syntax database to lint modulercs |
| 3 |
# Copyright (C) 2022-2025 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-label |
| 41 |
system |
| 42 |
uname |
| 43 |
versioncmp |
| 44 |
} |
| 45 |
|
| 46 |
# syntax |
| 47 |
set ::syntax(hide-modulefile) 1 |
| 48 |
set ::syntax(hide-version) 1 |
| 49 |
set ::syntax(is-loaded) x* |
| 50 |
set ::syntax(is-used) x* |
| 51 |
set ::syntax(lsb-release) s |
| 52 |
set ::syntax(module-alias) 2 |
| 53 |
# module-forbid accepts option at any position |
| 54 |
set ::syntax(module-forbid) {p* x p* x* p*} |
| 55 |
# module-hide accepts option at any position |
| 56 |
set ::syntax(module-hide) {o* x o* x* o*} |
| 57 |
set ::syntax(module-info) {s x?} |
| 58 |
set {::syntax(module-info alias)} 1 |
| 59 |
set {::syntax(module-info command)} x? |
| 60 |
set {::syntax(module-info loaded)} 1 |
| 61 |
set {::syntax(module-info mode)} x? |
| 62 |
set {::syntax(module-info name)} 0 |
| 63 |
set {::syntax(module-info shell)} x? |
| 64 |
set {::syntax(module-info shelltype)} x? |
| 65 |
set {::syntax(module-info specified)} 0 |
| 66 |
set {::syntax(module-info symbols)} 1 |
| 67 |
set {::syntax(module-info tags)} x? |
| 68 |
set {::syntax(module-info type)} 0 |
| 69 |
set {::syntax(module-info usergroups)} x? |
| 70 |
set {::syntax(module-info username)} x? |
| 71 |
set {::syntax(module-info version)} 1 |
| 72 |
# module-tag accepts option at any position |
| 73 |
set ::syntax(module-tag) {p* x p* x p* x* p*} |
| 74 |
set ::syntax(module-version) {x x x*} |
| 75 |
set ::syntax(module-virtual) 2 |
| 76 |
# module-warn accepts option at any position |
| 77 |
set ::syntax(module-warn) {p* x p* x* p*} |
| 78 |
set ::syntax(modulepath-label) 2 |
| 79 |
set ::syntax(system) {x x*} |
| 80 |
set ::syntax(uname) s |
| 81 |
set ::syntax(versioncmp) 2 |
| 82 |
# not implemented commands |
| 83 |
set {::syntax(module-info flags)} 0 |
| 84 |
set {::syntax(module-info trace)} 0 |
| 85 |
set {::syntax(module-info tracepat)} 0 |
| 86 |
set {::syntax(module-info user)} x? |
| 87 |
|
| 88 |
# return |
| 89 |
set ::return(is-loaded) int |
| 90 |
set ::return(is-used) int |
| 91 |
set ::return(system) int |
| 92 |
set ::return(versioncmp) int |
| 93 |
set {::return(module-info flags)} int |
| 94 |
|
| 95 |
# subCmd |
| 96 |
set ::subCmd(lsb-release) {id release codename} |
| 97 |
set ::subCmd(module-info) {alias command loaded mode name shell shelltype\ |
| 98 |
specified symbols tags type usergroups username version user trace\ |
| 99 |
tracepat flags} |
| 100 |
set ::subCmd(uname) {sysname nodename domain release version machine} |
| 101 |
|
| 102 |
# option |
| 103 |
set ::option(module-forbid) {--user --group --not-user --not-group --after\ |
| 104 |
--before --message --nearly-message} |
| 105 |
set {::option(module-forbid --user)} 1 |
| 106 |
set {::option(module-forbid --group)} 1 |
| 107 |
set {::option(module-forbid --not-user)} 1 |
| 108 |
set {::option(module-forbid --not-group)} 1 |
| 109 |
set {::option(module-forbid --after)} 1 |
| 110 |
set {::option(module-forbid --before)} 1 |
| 111 |
set ::option(module-hide) {--user --group --not-user --not-group --after\ |
| 112 |
--before --soft --hard --hidden-loaded} |
| 113 |
set {::option(module-hide --user)} 1 |
| 114 |
set {::option(module-hide --group)} 1 |
| 115 |
set {::option(module-hide --not-user)} 1 |
| 116 |
set {::option(module-hide --not-group)} 1 |
| 117 |
set {::option(module-hide --after)} 1 |
| 118 |
set {::option(module-hide --before)} 1 |
| 119 |
set ::option(module-tag) {--user --group --not-user --not-group} |
| 120 |
set {::option(module-tag --user)} 1 |
| 121 |
set {::option(module-tag --group)} 1 |
| 122 |
set {::option(module-tag --not-user)} 1 |
| 123 |
set {::option(module-tag --not-group)} 1 |
| 124 |
set ::option(module-warn) {--user --group --not-user --not-group --after\ |
| 125 |
--before --message} |
| 126 |
set {::option(module-warn --user)} 1 |
| 127 |
set {::option(module-warn --group)} 1 |
| 128 |
set {::option(module-warn --not-user)} 1 |
| 129 |
set {::option(module-warn --not-group)} 1 |
| 130 |
set {::option(module-warn --after)} 1 |
| 131 |
set {::option(module-warn --before)} 1 |
| 132 |
|
| 133 |
# vim:set tabstop=3 shiftwidth=3 expandtab autoindent: |