Skip to content

Commit d199d8c

Browse files
committed
lint: add module-warn command to syntaxdbs
Signed-off-by: Xavier Delaruelle <[email protected]>
1 parent d214bc1 commit d199d8c

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

share/nagelfar/syntaxdb_modulefile.tcl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ module-info
5050
module-tag
5151
module-version
5252
module-virtual
53+
module-warn
5354
module-whatis
5455
modulepath-label
5556
prepend-path
@@ -170,6 +171,8 @@ set {::syntax(module-info version)} 1
170171
set ::syntax(module-tag) {p* x p* x p* x* p*}
171172
set ::syntax(module-version) {x x x*}
172173
set ::syntax(module-virtual) 2
174+
# module-warn accepts option at any position
175+
set ::syntax(module-warn) {p* x p* x* p*}
173176
set ::syntax(module-whatis) 1
174177
set ::syntax(modulepath-label) 2
175178
set ::syntax(prepend-path) {o* x x x*}
@@ -294,6 +297,14 @@ set {::option(module-tag --user)} 1
294297
set {::option(module-tag --group)} 1
295298
set {::option(module-tag --not-user)} 1
296299
set {::option(module-tag --not-group)} 1
300+
set ::option(module-warn) {--user --group --not-user --not-group --after\
301+
--before --message}
302+
set {::option(module-warn --user)} 1
303+
set {::option(module-warn --group)} 1
304+
set {::option(module-warn --not-user)} 1
305+
set {::option(module-warn --not-group)} 1
306+
set {::option(module-warn --after)} 1
307+
set {::option(module-warn --before)} 1
297308
set ::option(prepend-path) {-d --delim --duplicates --ignore-refcount}
298309
set {::option(prepend-path -d)} 1
299310
set {::option(prepend-path --delim)} 1

share/nagelfar/syntaxdb_modulerc.tcl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
22
# SYNTAXDB_MODULERC.tcl, Nagelfar syntax database to lint modulercs
3-
# Copyright (C) 2022-2024 Xavier Delaruelle
3+
# Copyright (C) 2022-2025 Xavier Delaruelle
44
#
55
# This program is free software: you can redistribute it and/or modify
66
# it under the terms of the GNU General Public License as published by
@@ -36,6 +36,7 @@ module-info
3636
module-tag
3737
module-version
3838
module-virtual
39+
module-warn
3940
modulepath-label
4041
system
4142
uname
@@ -72,6 +73,8 @@ set {::syntax(module-info version)} 1
7273
set ::syntax(module-tag) {p* x p* x p* x* p*}
7374
set ::syntax(module-version) {x x x*}
7475
set ::syntax(module-virtual) 2
76+
# module-warn accepts option at any position
77+
set ::syntax(module-warn) {p* x p* x* p*}
7578
set ::syntax(modulepath-label) 2
7679
set ::syntax(system) {x x*}
7780
set ::syntax(uname) s
@@ -118,5 +121,13 @@ set {::option(module-tag --user)} 1
118121
set {::option(module-tag --group)} 1
119122
set {::option(module-tag --not-user)} 1
120123
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
121132

122133
# vim:set tabstop=3 shiftwidth=3 expandtab autoindent:

0 commit comments

Comments
 (0)