Skip to content

Commit 3b1aabd

Browse files
authored
change --hint[X] => --hint:X in nim repo (avoids shell quoting issues) (#18085)
1 parent 0b2bbca commit 3b1aabd

File tree

15 files changed

+25
-25
lines changed

15 files changed

+25
-25
lines changed

compiler/nim.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Special configuration file for the Nim project
22

3-
hint[XDeclaredButNotUsed]:off
3+
hint:XDeclaredButNotUsed:off
44

55
define:booting
66
define:nimcore
@@ -22,5 +22,5 @@ define:useStdoutAsStdmsg
2222
#gc:markAndSweep
2323

2424
@if nimHasWarningObservableStores:
25-
warning[ObservableStores]: off
25+
warning:ObservableStores: off
2626
@end

compiler/nimfix/nimfix.nim.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Special configuration file for the Nim project
22
# gc:markAndSweep
33

4-
hint[XDeclaredButNotUsed]:off
4+
hint:XDeclaredButNotUsed:off
55
path:"$projectPath/.."
66

77
path:"$lib/packages/docutils"

config/nim.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ cc = gcc
1313
# additional options always passed to the compiler:
1414
--parallel_build: "0" # 0 to auto-detect number of processors
1515

16-
hint[LineTooLong]=off
17-
#hint[XDeclaredButNotUsed]=off
16+
hint:LineTooLong:off
17+
#hint:XDeclaredButNotUsed:off
1818

1919
# Examples of how to setup a cross-compiler:
2020

doc/advopt.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ Advanced options:
4747
an implementation defined set of suggestions.
4848
-w:on|off|list, --warnings:on|off|list
4949
turn all warnings on|off or list all available
50-
--warning[X]:on|off turn specific warning X on|off
50+
--warning:X:on|off turn specific warning X on|off.
51+
`warning:X` means `warning:X:on`, as with similar flags.
5152
--hints:on|off|list turn all hints on|off or list all available
52-
--hint[X]:on|off turn specific hint X on|off
53-
--warningAsError[X]:on|off
54-
turn specific warning X into an error on|off
55-
--hintAsError[X]:on|off turn specific hint X into an error on|off
53+
--hint:X:on|off turn specific hint X on|off.
54+
--warningAsError:X:on|off turn specific warning X into an error on|off
55+
--hintAsError:X:on|off turn specific hint X into an error on|off
5656
--styleCheck:off|hint|error
5757
produce hints or errors for Nim identifiers that
5858
do not adhere to Nim's official style guide

doc/filters.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ just like an ordinary procedure call with named or positional arguments. The
2525
available parameters depend on the invoked filter. Before version 0.12.0 of
2626
the language `#!` was used instead of `#?`.
2727

28-
**Hint:** With `--hint[codeBegin]:on`:option: or `--verbosity:2`:option:
28+
**Hint:** With `--hint:codeBegin:on`:option: or `--verbosity:2`:option:
2929
(or higher) while compiling or `nim check`:cmd:, Nim lists the processed code after
3030
each filter application.
3131

doc/nimc.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ Advanced command-line switches are:
5353
List of warnings
5454
----------------
5555

56-
Each warning can be activated individually with `--warning[NAME]:on|off`:option: or
57-
in a `push` pragma.
56+
Each warning can be activated individually with `--warning:NAME:on|off`:option: or
57+
in a `push` pragma with `{.warning[NAME]:on|off.}`.
5858

5959
========================== ============================================
6060
Name Description
@@ -77,8 +77,8 @@ User Some user-defined warning.
7777
List of hints
7878
-------------
7979

80-
Each hint can be activated individually with `--hint[NAME]:on|off`:option: or in a
81-
`push` pragma.
80+
Each hint can be activated individually with `--hint:NAME:on|off`:option: or in a
81+
`push` pragma with `{.hint[NAME]:on|off.}`.
8282

8383
========================== ============================================
8484
Name Description

drnim/nim.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Special configuration file for the Nim project
22

3-
hint[XDeclaredButNotUsed]:off
3+
hint:XDeclaredButNotUsed:off
44

55
define:booting
66
define:nimcore

nimsuggest/nimsuggest.nim.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
gc:markAndSweep
44

5-
hint[XDeclaredButNotUsed]:off
5+
hint:XDeclaredButNotUsed:off
66

77
path:"$lib/packages/docutils"
88

testament/categories.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ proc icTests(r: var TResults; testsDir: string, cat: Category, options: string;
486486
writeOnly = " --incremental:writeonly "
487487
readOnly = " --incremental:readonly "
488488
incrementalOn = " --incremental:on -d:nimIcIntegrityChecks "
489-
navTestConfig = " --ic:on -d:nimIcNavigatorTests --hint[Conf]:off --warnings:off "
489+
navTestConfig = " --ic:on -d:nimIcNavigatorTests --hint:Conf:off --warnings:off "
490490

491491
template test(x: untyped) =
492492
testSpecWithNimcache(r, makeRawTest(file, x & options, cat), nimcache)
@@ -500,7 +500,7 @@ proc icTests(r: var TResults; testsDir: string, cat: Category, options: string;
500500

501501
template checkTest() =
502502
var test = makeRawTest(file, options, cat)
503-
test.spec.cmd = compilerPrefix & " check --hint[Conf]:off --warnings:off --ic:on $options " & file
503+
test.spec.cmd = compilerPrefix & " check --hint:Conf:off --warnings:off --ic:on $options " & file
504504
testSpecWithNimcache(r, test, nimcache)
505505

506506
if not isNavigatorTest:

tests/effects/toutparam.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
discard """
2-
cmd: '''nim c --warningAsError[Uninit]:on --skipCfg --skipParentCfg $file'''
2+
cmd: '''nim c --warningAsError:Uninit:on --skipCfg --skipParentCfg $file'''
33
errormsg: "use explicit initialization of 'x' for clarity [Uninit]"
44
line: 24
55
disabled: "true"

0 commit comments

Comments
 (0)