|
7 | 7 | # distribution, for details about the copyright.
|
8 | 8 | #
|
9 | 9 |
|
10 |
| -## This module contains the ``TMsgKind`` enum as well as the |
11 |
| -## ``TLineInfo`` object. |
| 10 | +## This module contains the `TMsgKind` enum as well as the |
| 11 | +## `TLineInfo` object. |
12 | 12 |
|
13 | 13 | import ropes, tables, pathutils, hashes
|
14 | 14 |
|
|
248 | 248 | TNoteKinds* = set[TNoteKind]
|
249 | 249 |
|
250 | 250 | proc computeNotesVerbosity(): array[0..3, TNoteKinds] =
|
| 251 | + result = default(array[0..3, TNoteKinds]) |
251 | 252 | result[3] = {low(TNoteKind)..high(TNoteKind)} - {warnObservableStores, warnResultUsed, warnAnyEnumConv, warnBareExcept}
|
252 | 253 | result[2] = result[3] - {hintStackTrace, hintExtendedContext, hintDeclaredLoc, hintProcessingStmt}
|
253 | 254 | result[1] = result[2] - {warnProveField, warnProveIndex,
|
|
341 | 342 |
|
342 | 343 |
|
343 | 344 | proc initMsgConfig*(): MsgConfig =
|
344 |
| - result.msgContext = @[] |
345 |
| - result.lastError = unknownLineInfo |
346 |
| - result.filenameToIndexTbl = initTable[string, FileIndex]() |
347 |
| - result.fileInfos = @[] |
348 |
| - result.errorOutputs = {eStdOut, eStdErr} |
| 345 | + result = MsgConfig(msgContext: @[], lastError: unknownLineInfo, |
| 346 | + filenameToIndexTbl: initTable[string, FileIndex](), |
| 347 | + fileInfos: @[], errorOutputs: {eStdOut, eStdErr} |
| 348 | + ) |
349 | 349 | result.filenameToIndexTbl["???"] = FileIndex(-1)
|
0 commit comments