lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson (JIRA)" <>
Subject [jira] [Commented] (LUCENE-7788) fail precommit on unparameterised log.trace messages
Date Thu, 17 May 2018 18:54:00 GMT


Erick Erickson commented on LUCENE-7788:

bq. ... would we need to differentiate log.debug(" 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,
log.debug("Method called");

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

is the same as your example, just puts quotes around 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:
>             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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message