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

Baseline feature #62

Closed
staabm opened this issue Jan 2, 2020 · 4 comments
Closed

Baseline feature #62

staabm opened this issue Jan 2, 2020 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@staabm
Copy link
Contributor

staabm commented Jan 2, 2020

Similar to psalm and phpstan it would be helpfull to integrate the tool in already existing code bases by providing a baseline feature.

A baseline allows you to define all rules and make sure all newly written code will obey these rules, without the need to fix the whole codebase for violations

See details in

https://medium.com/@ondrejmirtes/phpstans-baseline-feature-lets-you-hold-new-code-to-a-higher-standard-e77d815a5dff
https://psalm.dev/docs/running_psalm/dealing_with_code_issues/#using-a-baseline-file

@staabm staabm added the enhancement New feature or request label Jan 2, 2020
@carlosas
Copy link
Owner

carlosas commented Jan 3, 2020

I'm doing this with a pre-commit hook that extracts the changed files in the commit and modifies the phpat.yaml include option so the tests only include this files (this config is taken in the StatementBuilder).
https://gist.github.com/carlosas/36206cd95354245836226a9b3bb2a947
Is it the same result or does a baseline file bring something more?

Anyway the way I do it is a bit clunky, it would be a nice extra feature to implement.
Are you up for it? 😛

@carlosas carlosas removed their assignment Jan 3, 2020
@carlosas carlosas added the help wanted Extra attention is needed label Jan 3, 2020
@staabm
Copy link
Contributor Author

staabm commented Jan 3, 2020

I might work on such a feature when phpat gehts relevant for our projects.

atm. we need to setup other QA things first.

@smoench
Copy link

smoench commented Jan 29, 2020

You might have a look at https://github.com/DaveLiddament/sarb :-)

@carlosas
Copy link
Owner

Released with https://github.com/carlosas/phpat/releases/tag/0.8.0 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants