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

Introduce BaselineOutputFormatter #395

Merged
merged 2 commits into from
Oct 30, 2020

Conversation

marcelthole
Copy link
Contributor

Hello,

here is a possible solution to create a baseline for Deptrac.
With this simple formatter it's possible to use deptrac in a CI/CD environment without fixing all existing violations

@smoench
Copy link
Contributor

smoench commented Oct 20, 2020

Hi @marcelthole,

thank you for your contribution!

What do you think about implementing this as a feature like phpstan and/or psalm does? Having two options --update-baseline=deptrac.baseline.yaml and --set-baseline=deptrac.baseline.yaml or a similar approach.

@marcelthole
Copy link
Contributor Author

My first idea was a baseline.yml file. But is there a solution for including yml files in yml files?
I dind't find anything in the symfony documentation about it.

Without an include option, a manually copy into the configuration is required?

@smoench
Copy link
Contributor

smoench commented Oct 26, 2020

There is no such feature in the YAML-Component but of the DependencyInjection-Component. They read values of a key an import the files and use an array_merge for imported values.

@marcelthole
Copy link
Contributor Author

Thanks for the input. I looked at the DependencyInjection Component but didn't find a way to solve the current situation because it's not a configuration. I implemented a YmlFileLoader with the function of including one basefile.

I will check the Build and conflicts and update this pr soon.
(Btw. its hard to run the build tools locally because they are not defined in the require dev section 🙈 )

@smoench
Copy link
Contributor

smoench commented Oct 28, 2020

I'm using phive for tools installation. There is a Makefile which includes all necessary commands.

@marcelthole marcelthole force-pushed the create-baseline-formatter branch 3 times, most recently from d5a4582 to bc9e334 Compare October 28, 2020 18:41
tests/Configuration/LoaderTest.php Outdated Show resolved Hide resolved
@smoench smoench merged commit 2f16bed into qossmic:master Oct 30, 2020
@smoench
Copy link
Contributor

smoench commented Oct 30, 2020

Thank you, @marcelthole !

@marcelthole marcelthole deleted the create-baseline-formatter branch October 30, 2020 13:56
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

Successfully merging this pull request may close these issues.

None yet

2 participants