Skip to content

Check that fns are pipe-compatibleΒ #203

@mpadge

Description

@mpadge

Idea from @PietrH via internal https://ropensci.slack.com/archives/C05C3GP1CSU/p1719994234029299, to check that

That functions that return objects of the same class as their input, have this input argument in the first position (for pipe compatability)

Or even to ensure that functions return consistent output, also as per tidyverse style guide. Implementing directly would, however, be arguably proscriptive. There may indeed be valid cases for alternative API designs, so this would need to be carefully thought out. Implementation would nevertheless be relatively straighjtforward, and would only require additional typetracer dependency here. @PietrH also happy to further discuss ideas, approaches, and viability here. Thanks for the input!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions