Skip to content

S7 documentation issue #1745

@dipterix

Description

@dipterix

I was trying to use roxygen2 to document S7 class with function property

...
    describe = S7::new_property(
      class = S7::class_function | NULL,
      default = my_describe
    )
...

Gives me the following warning:

❯ checking for code/documentation mismatches ... WARNING
  Codoc mismatches from Rd file 'Foo.Rd':
  Foo
    Code: function(.data = function() NULL, id = character(0),
                   description = character(0), describe = function (x,
                   ..., max_print = 100) { UseMethod("my_describe")})
    Docs: function(.data = function() NULL, id = character(0),
                   description = character(0), describe = function(x,
                   ..., max_print = 100) { UseMethod("my_describe")})
    Mismatches in argument default values:
      Name: 'describe'
      Code: function (x, ..., max_print = 100) 
        {
            UseMethod("my_describe")
        }
      Docs: function(x, ..., max_print = 100) {
            UseMethod("my_describe")
        }

I think the default = my_describe should be quoted in the documentation instead of expanding it as a function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions