stryker-mutator / stryker-net

Mutation testing for .NET core and .NET framework!
https://stryker-mutator.io
Apache License 2.0
1.76k stars 175 forks source link

Generate filled stryker config file with cli command #1558

Closed rouke-broersma closed 8 months ago

rouke-broersma commented 3 years ago

Is your feature request related to a problem? Please describe. I would be nice if stryker can generate a complete stryker config file with all defaults filled in.

Describe the solution you'd like dotnet stryker init generates a config file with all defaults. No stryker run is started. If a stryker config already exists, it is overwritten.

richardwerkman commented 10 months ago

I'd like to debate the overwriting of a config file. Maybe with a confirmation?

Also I'd like to add that any options that are passed trough the CLI could also be filled in the config file already. This is however less trivial than it seems as we don't have a direct mapping in code between the CLI and JSON config names

ysbakker commented 10 months ago

I'd like to debate the overwriting of a config file. Maybe with a confirmation?

Discussed that we will overwrite the file by default

Also I'd like to add that any options that are passed trough the CLI could also be filled in the config file already. This is however less trivial than it seems as we don't have a direct mapping in code between the CLI and JSON config names

Seems very user-friendly, if you already have a working stryker command. Maybe I can implement a basic version of the init command first, and iterate on this so it allows this?

EDIT: This is a fairly easy step to implement. So I will also implement this.