fix #16346 rst2html now honors SuccessX (#16347)

* fix #16346 SuccessX rst2html

* cleanups

* _

* _

* _
This commit is contained in:
Timothee Cour 2020-12-26 14:28:56 -08:00 • committed by GitHub
commit e84354666a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 4 deletions

View file

@ -439,6 +439,13 @@ proc setCmd*(conf: ConfigRef, cmd: Command) =
proc setCommandEarly*(conf: ConfigRef, command: string) = proc setCommandEarly*(conf: ConfigRef, command: string) =
conf.command = command conf.command = command
setCmd(conf, command.parseCommand) setCmd(conf, command.parseCommand)
# command early customizations
# must be handled here to honor subsequent `--hint:x:on|off`
case conf.cmd
of cmdRst2html, cmdRst2tex: # xxx see whether to add others: cmdGendepend, etc.
conf.foreignPackageNotes = {hintSuccessX}
else:
conf.foreignPackageNotes = foreignPackageNotesDefault
proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo; proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
conf: ConfigRef) = conf: ConfigRef) =

View file

@ -424,6 +424,8 @@ template newPackageCache*(): untyped =
proc newProfileData(): ProfileData = proc newProfileData(): ProfileData =
ProfileData(data: newTable[TLineInfo, ProfileInfo]()) ProfileData(data: newTable[TLineInfo, ProfileInfo]())
const foreignPackageNotesDefault* = {hintProcessing, warnUnknownMagic, hintQuitCalled, hintExecuting}
proc newConfigRef*(): ConfigRef = proc newConfigRef*(): ConfigRef =
result = ConfigRef( result = ConfigRef(
selectedGC: gcRefc, selectedGC: gcRefc,
@ -435,8 +437,7 @@ proc newConfigRef*(): ConfigRef =
arcToExpand: newStringTable(modeStyleInsensitive), arcToExpand: newStringTable(modeStyleInsensitive),
m: initMsgConfig(), m: initMsgConfig(),
cppDefines: initHashSet[string](), cppDefines: initHashSet[string](),
headerFile: "", features: {}, legacyFeatures: {}, foreignPackageNotes: {hintProcessing, warnUnknownMagic, headerFile: "", features: {}, legacyFeatures: {}, foreignPackageNotes: foreignPackageNotesDefault,
hintQuitCalled, hintExecuting},
notes: NotesVerbosity[1], mainPackageNotes: NotesVerbosity[1], notes: NotesVerbosity[1], mainPackageNotes: NotesVerbosity[1],
configVars: newStringTable(modeStyleInsensitive), configVars: newStringTable(modeStyleInsensitive),
symbols: newStringTable(modeStyleInsensitive), symbols: newStringTable(modeStyleInsensitive),
@ -490,8 +491,7 @@ proc newPartialConfigRef*(): ConfigRef =
verbosity: 1, verbosity: 1,
options: DefaultOptions, options: DefaultOptions,
globalOptions: DefaultGlobalOptions, globalOptions: DefaultGlobalOptions,
foreignPackageNotes: {hintProcessing, warnUnknownMagic, foreignPackageNotes: foreignPackageNotesDefault,
hintQuitCalled, hintExecuting},
notes: NotesVerbosity[1], mainPackageNotes: NotesVerbosity[1]) notes: NotesVerbosity[1], mainPackageNotes: NotesVerbosity[1])
proc cppDefine*(c: ConfigRef; define: string) = proc cppDefine*(c: ConfigRef; define: string) =