Skip to content

[Core] Remove the deprecated -f/--format option. #1295

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

Merged
merged 1 commit into from
Mar 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions core/src/main/java/cucumber/api/CucumberOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@
*/
String[] tags() default {};

/**
* @return what formatter(s) to use
* @deprecated use {@link #plugin()}
*/
@Deprecated
String[] format() default {};

/**
* @return what plugins(s) to use
*/
Expand Down
3 changes: 0 additions & 3 deletions core/src/main/java/cucumber/runtime/RuntimeOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,6 @@ private void parse(List<String> args) {
parsedTagFilters.add(args.remove(0));
} else if (arg.equals("--plugin") || arg.equals("--add-plugin") || arg.equals("-p")) {
parsedPluginData.addPluginName(args.remove(0), arg.equals("--add-plugin"));
} else if (arg.equals("--format") || arg.equals("-f")) {
System.err.println("WARNING: Cucumber-JVM's --format option is deprecated. Please use --plugin instead.");
parsedPluginData.addPluginName(args.remove(0), true);
} else if (arg.equals("--no-dry-run") || arg.equals("--dry-run") || arg.equals("-d")) {
dryRun = !arg.startsWith("--no-");
} else if (arg.equals("--no-strict") || arg.equals("--strict") || arg.equals("-s")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ private void addTags(CucumberOptions options, List<String> args) {
private void addPlugins(CucumberOptions options, List<String> args) {
List<String> plugins = new ArrayList<String>();
plugins.addAll(asList(options.plugin()));
plugins.addAll(asList(options.format()));
for (String plugin : plugins) {
args.add("--plugin");
args.add(plugin);
Expand Down
1 change: 0 additions & 1 deletion core/src/main/resources/cucumber/api/cli/USAGE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Options:
registration of 3rd party plugins.
--add-plugin does not clobber plugins of that
type defined from a different source.
-f, --format FORMAT[:PATH_OR_URL] Deprecated. Use --plugin instead.
-t, --tags TAG_EXPRESSION Only run scenarios tagged with tags matching
TAG_EXPRESSION.
-n, --name REGEXP Only run scenarios whose names match REGEXP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* AbstractTestNGCucumberTests but still executes each scenario as a separate
* TestNG test.
*/
@CucumberOptions(strict = true, format = "json:target/cucumber-report-feature-composite.json")
@CucumberOptions(strict = true, plugin = "json:target/cucumber-report-feature-composite.json")
public class RunCukesByCompositionTest extends RunCukesByCompositionBase {
private TestNGCucumberRunner testNGCucumberRunner;

Expand Down