change --hint[X] => --hint:X in nim repo (avoids shell quoting issues) (#18085)

This commit is contained in:
Timothee Cour 2021-05-26 00:51:48 -07:00 • committed by GitHub
commit 3b1aabdcff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 25 additions and 25 deletions

View file

@ -1,6 +1,6 @@
# Special configuration file for the Nim project # Special configuration file for the Nim project
hint[XDeclaredButNotUsed]:off hint:XDeclaredButNotUsed:off
define:booting define:booting
define:nimcore define:nimcore
@ -22,5 +22,5 @@ define:useStdoutAsStdmsg
#gc:markAndSweep #gc:markAndSweep
@if nimHasWarningObservableStores: @if nimHasWarningObservableStores:
warning[ObservableStores]: off warning:ObservableStores: off
@end @end

View file

@ -1,7 +1,7 @@
# Special configuration file for the Nim project # Special configuration file for the Nim project
# gc:markAndSweep # gc:markAndSweep
hint[XDeclaredButNotUsed]:off hint:XDeclaredButNotUsed:off
path:"$projectPath/.." path:"$projectPath/.."
path:"$lib/packages/docutils" path:"$lib/packages/docutils"

View file

@ -13,8 +13,8 @@ cc = gcc
# additional options always passed to the compiler: # additional options always passed to the compiler:
--parallel_build: "0" # 0 to auto-detect number of processors --parallel_build: "0" # 0 to auto-detect number of processors
hint[LineTooLong]=off hint:LineTooLong:off
#hint[XDeclaredButNotUsed]=off #hint:XDeclaredButNotUsed:off
# Examples of how to setup a cross-compiler: # Examples of how to setup a cross-compiler:

View file

@ -47,12 +47,12 @@ Advanced options:
an implementation defined set of suggestions. an implementation defined set of suggestions.
-w:on|off|list, --warnings:on|off|list -w:on|off|list, --warnings:on|off|list
turn all warnings on|off or list all available turn all warnings on|off or list all available
--warning[X]:on|off turn specific warning X on|off --warning:X:on|off turn specific warning X on|off.
`warning:X` means `warning:X:on`, as with similar flags.
--hints:on|off|list turn all hints on|off or list all available --hints:on|off|list turn all hints on|off or list all available
--hint[X]:on|off turn specific hint X on|off --hint:X:on|off turn specific hint X on|off.
--warningAsError[X]:on|off --warningAsError:X:on|off turn specific warning X into an error on|off
turn specific warning X into an error on|off --hintAsError:X:on|off turn specific hint X into an error on|off
--hintAsError[X]:on|off turn specific hint X into an error on|off
--styleCheck:off|hint|error --styleCheck:off|hint|error
produce hints or errors for Nim identifiers that produce hints or errors for Nim identifiers that
do not adhere to Nim's official style guide do not adhere to Nim's official style guide

View file

@ -25,7 +25,7 @@ just like an ordinary procedure call with named or positional arguments. The
available parameters depend on the invoked filter. Before version 0.12.0 of available parameters depend on the invoked filter. Before version 0.12.0 of
the language `#!` was used instead of `#?`. the language `#!` was used instead of `#?`.
**Hint:** With `--hint[codeBegin]:on`:option: or `--verbosity:2`:option: **Hint:** With `--hint:codeBegin:on`:option: or `--verbosity:2`:option:
(or higher) while compiling or `nim check`:cmd:, Nim lists the processed code after (or higher) while compiling or `nim check`:cmd:, Nim lists the processed code after
each filter application. each filter application.

View file

@ -53,8 +53,8 @@ Advanced command-line switches are:
List of warnings List of warnings
---------------- ----------------
Each warning can be activated individually with `--warning[NAME]:on|off`:option: or Each warning can be activated individually with `--warning:NAME:on|off`:option: or
in a `push` pragma. in a `push` pragma with `{.warning[NAME]:on|off.}`.
========================== ============================================ ========================== ============================================
Name Description Name Description
@ -77,8 +77,8 @@ User Some user-defined warning.
List of hints List of hints
------------- -------------
Each hint can be activated individually with `--hint[NAME]:on|off`:option: or in a Each hint can be activated individually with `--hint:NAME:on|off`:option: or in a
`push` pragma. `push` pragma with `{.hint[NAME]:on|off.}`.
========================== ============================================ ========================== ============================================
Name Description Name Description

View file

@ -1,6 +1,6 @@
# Special configuration file for the Nim project # Special configuration file for the Nim project
hint[XDeclaredButNotUsed]:off hint:XDeclaredButNotUsed:off
define:booting define:booting
define:nimcore define:nimcore

View file

@ -2,7 +2,7 @@
gc:markAndSweep gc:markAndSweep
hint[XDeclaredButNotUsed]:off hint:XDeclaredButNotUsed:off
path:"$lib/packages/docutils" path:"$lib/packages/docutils"

View file

@ -486,7 +486,7 @@ proc icTests(r: var TResults; testsDir: string, cat: Category, options: string;
writeOnly = " --incremental:writeonly " writeOnly = " --incremental:writeonly "
readOnly = " --incremental:readonly " readOnly = " --incremental:readonly "
incrementalOn = " --incremental:on -d:nimIcIntegrityChecks " incrementalOn = " --incremental:on -d:nimIcIntegrityChecks "
navTestConfig = " --ic:on -d:nimIcNavigatorTests --hint[Conf]:off --warnings:off " navTestConfig = " --ic:on -d:nimIcNavigatorTests --hint:Conf:off --warnings:off "
template test(x: untyped) = template test(x: untyped) =
testSpecWithNimcache(r, makeRawTest(file, x & options, cat), nimcache) testSpecWithNimcache(r, makeRawTest(file, x & options, cat), nimcache)
@ -500,7 +500,7 @@ proc icTests(r: var TResults; testsDir: string, cat: Category, options: string;
template checkTest() = template checkTest() =
var test = makeRawTest(file, options, cat) var test = makeRawTest(file, options, cat)
test.spec.cmd = compilerPrefix & " check --hint[Conf]:off --warnings:off --ic:on $options " & file test.spec.cmd = compilerPrefix & " check --hint:Conf:off --warnings:off --ic:on $options " & file
testSpecWithNimcache(r, test, nimcache) testSpecWithNimcache(r, test, nimcache)
if not isNavigatorTest: if not isNavigatorTest:

View file

@ -1,5 +1,5 @@
discard """ discard """
cmd: '''nim c --warningAsError[Uninit]:on --skipCfg --skipParentCfg $file''' cmd: '''nim c --warningAsError:Uninit:on --skipCfg --skipParentCfg $file'''
errormsg: "use explicit initialization of 'x' for clarity [Uninit]" errormsg: "use explicit initialization of 'x' for clarity [Uninit]"
line: 24 line: 24
disabled: "true" disabled: "true"

View file

@ -13,7 +13,7 @@ var ps: seq[Process] # compile & run 2 progs in parallel
const nim = getCurrentCompilerExe() const nim = getCurrentCompilerExe()
for prog in ["a", "b"]: for prog in ["a", "b"]:
ps.add startProcess(nim, "", ps.add startProcess(nim, "",
["r", "--hint[Conf]=off", "--hint[Processing]=off", prog], ["r", "--hint:Conf:off", "--hint:Processing:off", prog],
options = {poUsePath, poDaemon, poStdErrToStdOut}) options = {poUsePath, poDaemon, poStdErrToStdOut})
for p in ps: for p in ps:

View file

@ -1,5 +1,5 @@
discard """ discard """
cmd: "nim check --hint[processing]:off $file" cmd: "nim check --hint:processing:off $file"
errormsg: "3 is not two" errormsg: "3 is not two"
nimout: '''t8741.nim(13, 9) Error: cannot attach a custom pragma to 'a' nimout: '''t8741.nim(13, 9) Error: cannot attach a custom pragma to 'a'
t8741.nim(29, 15) template/generic instantiation of `onlyTwo` from here t8741.nim(29, 15) template/generic instantiation of `onlyTwo` from here

View file

@ -1,5 +1,5 @@
discard """ discard """
cmd: "nim check --hint[Processing]:off --hint[Conf]:off $file" cmd: "nim check --hint:Processing:off --hint:Conf:off $file"
errormsg: "18446744073709551615 can't be converted to int8" errormsg: "18446744073709551615 can't be converted to int8"
nimout: '''tcompiletime_range_checks.nim(36, 21) Error: 2147483648 can't be converted to int32 nimout: '''tcompiletime_range_checks.nim(36, 21) Error: 2147483648 can't be converted to int32
tcompiletime_range_checks.nim(37, 23) Error: -1 can't be converted to uint64 tcompiletime_range_checks.nim(37, 23) Error: -1 can't be converted to uint64

View file

@ -1,5 +1,5 @@
discard """ discard """
cmd: '''nim c --hint[Processing]:off $file''' cmd: '''nim c --hint:Processing:off $file'''
nimout: ''' nimout: '''
tunused_imports.nim(11, 10) Warning: BEGIN [User] tunused_imports.nim(11, 10) Warning: BEGIN [User]
tunused_imports.nim(36, 10) Warning: END [User] tunused_imports.nim(36, 10) Warning: END [User]

View file

@ -53,7 +53,7 @@ proc initConfigData(c: var TConfigData) =
c.webdoc = @[] c.webdoc = @[]
c.pdf = @[] c.pdf = @[]
c.infile = "" c.infile = ""
c.nimArgs = "--hint[Conf]:off --hint[Path]:off --hint[Processing]:off -d:boot " c.nimArgs = "--hint:Conf:off --hint:Path:off --hint:Processing:off -d:boot "
c.gitURL = "https://github.com/nim-lang/Nim" c.gitURL = "https://github.com/nim-lang/Nim"
c.docHTMLOutput = "doc/html" c.docHTMLOutput = "doc/html"
c.webUploadOutput = "web/upload" c.webUploadOutput = "web/upload"