Skip to content

Default scaffoldWidget shouldn't throw devtools::check() errors/warnings #430

@ColinFay

Description

@ColinFay

Hey,

When build a default htmlwidget, the base elements throw devtools::check() errors.

Here is a reprex :

cd /tmp/
R -e "usethis::create_package('rrr');setwd('rrr');htmlwidgets::scaffoldWidget('rrr');devtools::document();devtools::check()"
[...] # output truncated 
E  checking package dependencies (4.6s)
   Namespace dependency missing from DESCRIPTION Imports/Depends entries: ‘htmlwidgets’
   
   See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
   manual.
   
   See
     ‘/private/var/folders/5z/rm2h62lj45d332kfpj28c8zm0000gn/T/RtmpjXzmji/rrr.Rcheck/00check.log’
   for details.
   
   
── R CMD check results ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── rrr 0.0.0.9000 ────
Duration: 5.5s

❯ checking package dependencies ... ERROR
  Namespace dependency missing from DESCRIPTION Imports/Depends entries: ‘htmlwidgets’
  
  See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
  manual.

1 error ✖ | 0 warnings ✔ | 0 notes ✔
Erreur : R CMD check found ERRORs

I have to manually add {htmlwidgets} as a dep when it could be done automatically.

And still it throws documentation errors :

cd rrr
R -e "devtools::document();devtools::check()"
[...] # truncated
ℹ Updating rrr documentation
ℹ Loading rrr
Avis : [/private/tmp/rrr/R/rrr.R:1] @title Use of HTML blocks is not currently supported
Avis : [/private/tmp/rrr/R/rrr.R:3] @description Use of HTML blocks is not currently supported
Writing NAMESPACE
Writing NAMESPACE
ℹ Updating rrr documentation
ℹ Loading rrr
Avis : [/private/tmp/rrr/R/rrr.R:1] @title Use of HTML blocks is not currently supported
Avis : [/private/tmp/rrr/R/rrr.R:3] @description Use of HTML blocks is not currently supported
Writing NAMESPACE
Writing NAMESPACE
[...] # Truncated
── R CMD check results ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── rrr 0.0.0.9000 ────
Duration: 33.3s

❯ checking DESCRIPTION meta-information ... WARNING
  Invalid license file pointers: LICENSE

❯ checking Rd \usage sections ... WARNING
  Undocumented arguments in documentation object 'rrr'
    ‘message’ ‘width’ ‘height’ ‘elementId’
  
  Functions with \usage entries need to have the appropriate \alias
  entries, and all their arguments documented.
  The \usage entries must correspond to syntactically valid R code.
  See chapter ‘Writing R documentation files’ in the ‘Writing R
  Extensions’ manual.

0 errors ✔ | 2 warnings ✖ | 0 notes ✔

As far as I can tell, the license error is perfectly normal (you can't enforce the license) but HTML entry in doc + the non documentation of default parameter (which are htmlwidget specific so I'm not sure how to document them) could be prevented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions