Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better detection of illegal options #60

Open
szeiger opened this issue Oct 8, 2014 · 1 comment
Open

Better detection of illegal options #60

szeiger opened this issue Oct 8, 2014 · 1 comment

Comments

@szeiger
Copy link
Contributor

szeiger commented Oct 8, 2014

Currently any non-option parameter is treated as a glob pattern which can lead to surprising bugs. For example, see https://gist.github.com/ktoso/baba2cacad58bddd4235 which is caused by "testOptions in Test += Tests.Argument("-oDF")" (parameters for ScalaTest which are not scoped correctly). Since glob patterns starting with a dash should be rare, I suggest we require an extra "--" separator before any such options, e.g. "test-only -- -v -a -- -reallyAPattern". Any other argument starting with a dash before this separator should be reported as an error and fail the whole test run.

@ktoso
Copy link
Member

ktoso commented Oct 8, 2014

Yes, that would be a great change, the above sample gist really confused me for quite a while!
And for unknown options simply blow up, explaining "if you really wanted to ... use --".

Related issue in case someone thinks his problem is "junit-interface can't see java tests" etc: akka/akka#16053

ktoso added a commit to ktoso/akka that referenced this issue Oct 8, 2014
The junit-interface is treating "anything it cannot understand" as a
globbing pattern, thus when it didn't understand ScalaTest options, it
used them for globbing, and of course none of our junit tests matched
the "-oDF" pattern for example.

Debugged this with Stefan and we've opened an issue to improve the
integration in this respect:
sbt/junit-interface#60

Resolves akka#15178
ktoso added a commit to ktoso/akka that referenced this issue Oct 8, 2014
The junit-interface is treating "anything it cannot understand" as a
globbing pattern, thus when it didn't understand ScalaTest options, it
used them for globbing, and of course none of our junit tests matched
the "-oDF" pattern for example.

Debugged this with Stefan and we've opened an issue to improve the
integration in this respect:
sbt/junit-interface#60

Resolves akka#15178
ktoso added a commit to ktoso/akka that referenced this issue Jan 11, 2016
The junit-interface is treating "anything it cannot understand" as a
globbing pattern, thus when it didn't understand ScalaTest options, it
used them for globbing, and of course none of our junit tests matched
the "-oDF" pattern for example.

Debugged this with Stefan and we've opened an issue to improve the
integration in this respect:
sbt/junit-interface#60

Resolves akka#15178
ktoso added a commit to ktoso/akka that referenced this issue Jan 11, 2016
The junit-interface is treating "anything it cannot understand" as a
globbing pattern, thus when it didn't understand ScalaTest options, it
used them for globbing, and of course none of our junit tests matched
the "-oDF" pattern for example.

Debugged this with Stefan and we've opened an issue to improve the
integration in this respect:
sbt/junit-interface#60

Resolves akka#15178
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants