You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by David Smiley <da...@gmail.com> on 2018/08/30 18:47:09 UTC
Treat javac warnings as errors in some modules?
It'd be nice to have javac warning-free code. Some modules are already
warning-free. Are people ocay with enforcing this constraint (treating
warnings as errors) for modules that are already warning-free?
I found I could enforce this in one such lucene module (highlighter) by
simply adding this:
<property name="javac.args" value="-Werror -Xlint -Xlint:-deprecation
-Xlint:-serial"/>
The "-Werror" is the important part. The rest of the line is copied from
common-build.xm.
~ David
--
Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
http://www.solrenterprisesearchserver.com
Re: Treat javac warnings as errors in some modules?
Posted by Jan Høydahl <ja...@cominvent.com>.
+1
--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
> 30. aug. 2018 kl. 21:41 skrev Jason Gerlowski <ge...@gmail.com>:
>
> +1 from me
> On Thu, Aug 30, 2018 at 3:33 PM Erick Erickson <er...@gmail.com> wrote:
>>
>> +1 from me. One of my long-term goals is to gradually work through a
>> lot of Solr/Lucene code and get the warnings out. At that point I
>> fully intend to make warnings fail on clean code so we don't
>> backslide.
>> On Thu, Aug 30, 2018 at 11:47 AM David Smiley <da...@gmail.com> wrote:
>>>
>>> It'd be nice to have javac warning-free code. Some modules are already warning-free. Are people ocay with enforcing this constraint (treating warnings as errors) for modules that are already warning-free?
>>>
>>> I found I could enforce this in one such lucene module (highlighter) by simply adding this:
>>>
>>> <property name="javac.args" value="-Werror -Xlint -Xlint:-deprecation -Xlint:-serial"/>
>>>
>>> The "-Werror" is the important part. The rest of the line is copied from common-build.xm.
>>>
>>> ~ David
>>> --
>>> Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
>>> LinkedIn: http://linkedin.com/in/davidwsmiley | Book: http://www.solrenterprisesearchserver.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
Re: Treat javac warnings as errors in some modules?
Posted by Jason Gerlowski <ge...@gmail.com>.
+1 from me
On Thu, Aug 30, 2018 at 3:33 PM Erick Erickson <er...@gmail.com> wrote:
>
> +1 from me. One of my long-term goals is to gradually work through a
> lot of Solr/Lucene code and get the warnings out. At that point I
> fully intend to make warnings fail on clean code so we don't
> backslide.
> On Thu, Aug 30, 2018 at 11:47 AM David Smiley <da...@gmail.com> wrote:
> >
> > It'd be nice to have javac warning-free code. Some modules are already warning-free. Are people ocay with enforcing this constraint (treating warnings as errors) for modules that are already warning-free?
> >
> > I found I could enforce this in one such lucene module (highlighter) by simply adding this:
> >
> > <property name="javac.args" value="-Werror -Xlint -Xlint:-deprecation -Xlint:-serial"/>
> >
> > The "-Werror" is the important part. The rest of the line is copied from common-build.xm.
> >
> > ~ David
> > --
> > Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
> > LinkedIn: http://linkedin.com/in/davidwsmiley | Book: http://www.solrenterprisesearchserver.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: Treat javac warnings as errors in some modules?
Posted by Erick Erickson <er...@gmail.com>.
+1 from me. One of my long-term goals is to gradually work through a
lot of Solr/Lucene code and get the warnings out. At that point I
fully intend to make warnings fail on clean code so we don't
backslide.
On Thu, Aug 30, 2018 at 11:47 AM David Smiley <da...@gmail.com> wrote:
>
> It'd be nice to have javac warning-free code. Some modules are already warning-free. Are people ocay with enforcing this constraint (treating warnings as errors) for modules that are already warning-free?
>
> I found I could enforce this in one such lucene module (highlighter) by simply adding this:
>
> <property name="javac.args" value="-Werror -Xlint -Xlint:-deprecation -Xlint:-serial"/>
>
> The "-Werror" is the important part. The rest of the line is copied from common-build.xm.
>
> ~ David
> --
> Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
> LinkedIn: http://linkedin.com/in/davidwsmiley | Book: http://www.solrenterprisesearchserver.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org