From Rainer at krugs.de  Thu Jan 21 09:26:13 2016
From: Rainer at krugs.de (Rainer M Krug)
Date: Thu, 21 Jan 2016 09:26:13 +0100
Subject: [Rd] Warn on partial matches in R CMD check
In-Reply-To: <CABdHhvEs4gX+MHFbeyF4jLnUyFM1hUMt0777d-UY524mpZ864Q@mail.gmail.com>
	(Hadley Wickham's message of "Wed, 20 Jan 2016 16:13:13 -0600")
References: <CABdHhvEs4gX+MHFbeyF4jLnUyFM1hUMt0777d-UY524mpZ864Q@mail.gmail.com>
Message-ID: <m2mvrzs5i2.fsf@krugs.de>

Hadley Wickham <h.wickham at gmail.com> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 454 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20160121/70c3d657/attachment.bin>


[Rd] Warn on partial matches in R CMD check
Rainer M Krug