stryker-mutator / stryker-js

Mutation testing for JavaScript and friends
https://stryker-mutator.io
Apache License 2.0
2.58k stars 248 forks source link

Rename ConfigWriter #311

Closed simondel closed 7 years ago

simondel commented 7 years ago

We have an interface named ConfigWriter in the stryker-api that allows plugins to alter the stryker config at runtime (before stryker starts testing). However, these plugins don't actually write any config, they just modify the existing config.

This interface (and everything that implements it) should be renamed to reflect this in order to prevent confusion with the StrykerConfigWriter in the initializer code. The StrykerConfigWriter does not implement ConfigWriter and is responsible for writing config.

sharikovvladislav commented 7 years ago

So the task is: rename ConfigWrite interface and fix each class which implements it, right?

nicojs commented 7 years ago

Yes. Question is: in what. Maybe Configurator?

@simondel what do you think?

sharikovvladislav commented 7 years ago

May be be ConfigEditor or ConfigModifier since:

they just modify the existing config

Well, Configurator is good too.

sharikovvladislav commented 7 years ago

So it will be like F2 (vscode rename) on the interface definition, change name and commit, right? :)

sharikovvladislav commented 7 years ago

You can see the result there: https://github.com/stryker-mutator/stryker/pull/357. What do you think folks? @simondel @nicojs

nicojs commented 7 years ago

@simondel what do you think of the naming?

simondel commented 7 years ago

@nicojs I like ConfigEditor the most. An implementing class will edit the config, but it won't (shouldn't) write it to disk like the StrykerConfigWriter