if scalastyle_config:
options["config"] = scalastyle_config
if excludes:
options["excludes"] = excludes
return self.context(
options={
After Change
def _create_context(self, scalastyle_config=None, excludes=None, target_roots=None):
// If config is not specified, then we override pants.ini scalastyle such that
// we have a default scalastyle config xml but with empty excludes.
self.set_options(skip=False, config=scalastyle_config, excludes=excludes)
return self.context(target_roots=target_roots)
def _create_scalastyle_task(self, scalastyle_config):
return self.prepare_execute(self._create_context(scalastyle_config))