[ 
https://issues.apache.org/jira/browse/LUCENE-7788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16479557#comment-16479557
 ] 

Erick Erickson commented on LUCENE-7788:
----------------------------------------

bq. ... would we need to differentiate log.debug("Foo.bar() called");...

If (and only if) it would be easy IMO. I don't think it's too onerous that, 
assuming supporting your example turns into a rat-hole, we'd require re-wording 
the message. Something like this, say 
{code}
log.debug("Method Foo.bar called");
{code}

And how far we go down various cases .vs. doing a bit of rewording gets weird 
pretty quickly.
{code}
log.debug("method\"Foo.bar()\" ");
{code}

is the same as your example, just puts quotes around Foo.bar(). So still would 
be legal, but any simple check that just looked for method calls outside pairs 
of double quotes would mistakenly fail it.

Personally I don't feel the need to support everything anyone wants to put in, 
what we enforce via precommit just becomes the norm. So we'll make a best 
effort to accommodate things like this example but if it takes more than a few 
minutes not bother. If someone feels strongly enough about it to put the work 
into supporting it, they're perfectly free to do so ;)


> fail precommit on unparameterised log.trace messages
> ----------------------------------------------------
>
>                 Key: LUCENE-7788
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7788
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Christine Poerschke
>            Assignee: Christine Poerschke
>            Priority: Minor
>         Attachments: LUCENE-7788.patch, LUCENE-7788.patch
>
>
> SOLR-10415 would be removing existing unparameterised log.trace messages use 
> and once that is in place then this ticket's one-line change would be for 
> 'ant precommit' to reject any future unparameterised log.trace message use.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to