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

Default baseline file? #6356

Closed
ro0NL opened this issue Aug 23, 2021 · 3 comments
Closed

Default baseline file? #6356

ro0NL opened this issue Aug 23, 2021 · 3 comments

Comments

@ro0NL
Copy link
Contributor

ro0NL commented Aug 23, 2021

Hi,

From https://psalm.dev/docs/running_psalm/dealing_with_code_issues/#using-a-baseline-file

I found running psalm --set-baseline does nothing, where i expected it would took the baseline file as configured in psalm.xml (errorBaseline) 🤔 since providing the same value (as documented) does work. However i thought the docs did to initally generate it also :)

Also i believe the term "update" is rather implicit: "to remove references to things that have been fixed", if not confusing vs. "set".

WDYT?

@orklah
Copy link
Collaborator

orklah commented Aug 28, 2021

Not sure I followed you.

--set-baseline expect a filename, it will add the filename to your current xml config and rewrite the complete baseline in it
--update-baseline does not expect an argument and it will only remove outdated issues (it will not add new ones)

If the suggestion is to be able to remove the filename for --set-baseline, then it's a duplicate of #5831. If there is another thing, can you explain it further?

@ro0NL
Copy link
Contributor Author

ro0NL commented Aug 28, 2021

Ack. I have the same POV as #5831 (comment) 👍

I do believe an update can be interpreted as both "add" and "remove".

IIUC we could add a third option, eg.--sync-baseline [optional-filename] that invokes both steps.

My usecase is dusting the develop branch :) eg. updating basefile with the current branch's status quo.

@orklah
Copy link
Collaborator

orklah commented Aug 28, 2021

Feel free to propose a PR to make the filename optional, I think this would be accepted. I'll close this as duplicate of #5831 then

@orklah orklah closed this as completed Aug 28, 2021
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

No branches or pull requests

2 participants