Warn on partial matches in R CMD check

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Warn on partial matches in R CMD check

hadley wickham
Hi all (but especially Kurt),

Would it be possible to have a flag to R CMD check that warned on
partial all matches, i.e. turning on:

options(
  warnPartialMatchDollar = TRUE,
  warnPartialMatchArgs = TRUE,
  warnPartialMatchAttr = TRUE
)

I think this is good practice for package code.

I don't think it can currently be made part of the default (because
sometimes the warnings come from other packages), but it would be
really convenient to have as a switch.

Hadley

--
http://had.co.nz/

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: Warn on partial matches in R CMD check

Yihui Xie-2
+1 "What you write is **probably** what you get" sounds like a very
bad idea to me. The real solution to laziness should be
auto-completion instead of partial matching.

Regards,
Yihui


On Wed, Jan 20, 2016 at 4:13 PM, Hadley Wickham <[hidden email]> wrote:

> Hi all (but especially Kurt),
>
> Would it be possible to have a flag to R CMD check that warned on
> partial all matches, i.e. turning on:
>
> options(
>   warnPartialMatchDollar = TRUE,
>   warnPartialMatchArgs = TRUE,
>   warnPartialMatchAttr = TRUE
> )
>
> I think this is good practice for package code.
>
> I don't think it can currently be made part of the default (because
> sometimes the warnings come from other packages), but it would be
> really convenient to have as a switch.
>
> Hadley
>
> --
> http://had.co.nz/
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: Warn on partial matches in R CMD check

Rainer Krug-3
In reply to this post by hadley wickham
Hadley Wickham <[hidden email]> writes:

> Hi all (but especially Kurt),
>
> Would it be possible to have a flag to R CMD check that warned on
> partial all matches, i.e. turning on:
>
> options(
>   warnPartialMatchDollar = TRUE,
>   warnPartialMatchArgs = TRUE,
>   warnPartialMatchAttr = TRUE
> )
>
> I think this is good practice for package code.
+1

I think that would be brilliant because I already spend a few days
chasing down an error because of an unintended partial match.

>
> I don't think it can currently be made part of the default (because
> sometimes the warnings come from other packages), but it would be
> really convenient to have as a switch.

and also possibly to enable this for normal running of code outside of packages.


Cheers,

Rainer

>
> Hadley

--
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

signature.asc (463 bytes) Download Attachment