Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LARA
inox
Commits
ac07339d
Commit
ac07339d
authored
6 years ago
by
Romain Ruetschi
Browse files
Options
Downloads
Patches
Plain Diff
Add override point for reporter creation
parent
ec5dd7d4
No related branches found
No related tags found
1 merge request
!91
Add override point for reporter creation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/scala/inox/Main.scala
+5
-2
5 additions, 2 deletions
src/main/scala/inox/Main.scala
with
5 additions
and
2 deletions
src/main/scala/inox/Main.scala
+
5
−
2
View file @
ac07339d
...
@@ -129,8 +129,11 @@ trait MainHelpers {
...
@@ -129,8 +129,11 @@ trait MainHelpers {
val
parser
=
{
(
_:
String
)
=>
throw
FatalError
(
"Unparsable option \"files\""
)
}
val
parser
=
{
(
_:
String
)
=>
throw
FatalError
(
"Unparsable option \"files\""
)
}
}
}
protected
def
newReporter
(
debugSections
:
Set
[
DebugSection
])
:
inox.Reporter
=
new
DefaultReporter
(
debugSections
)
protected
def
processOptions
(
args
:
Seq
[
String
])
:
Context
=
{
protected
def
processOptions
(
args
:
Seq
[
String
])
:
Context
=
{
val
initReporter
=
new
Default
Reporter
(
Set
())
val
initReporter
=
newReporter
(
Set
())
val
opts
=
args
.
filter
(
_
.
startsWith
(
"--"
))
val
opts
=
args
.
filter
(
_
.
startsWith
(
"--"
))
...
@@ -152,7 +155,7 @@ trait MainHelpers {
...
@@ -152,7 +155,7 @@ trait MainHelpers {
for
((
optDef
,
values
)
<-
inoxOptions
.
groupBy
(
_
.
optionDef
)
if
values
.
size
>
1
)
for
((
optDef
,
values
)
<-
inoxOptions
.
groupBy
(
_
.
optionDef
)
if
values
.
size
>
1
)
initReporter
.
fatalError
(
s
"Duplicate option: ${optDef.name}"
)
initReporter
.
fatalError
(
s
"Duplicate option: ${optDef.name}"
)
val
reporter
=
new
Default
Reporter
(
val
reporter
=
newReporter
(
inoxOptions
.
collectFirst
{
inoxOptions
.
collectFirst
{
case
OptionValue
(
`optDebug`
,
sections
)
=>
sections
.
asInstanceOf
[
Set
[
DebugSection
]]
case
OptionValue
(
`optDebug`
,
sections
)
=>
sections
.
asInstanceOf
[
Set
[
DebugSection
]]
}.
getOrElse
(
Set
[
DebugSection
]())
}.
getOrElse
(
Set
[
DebugSection
]())
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment