You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Dawid Weiss (Jira)" <ji...@apache.org> on 2021/12/08 19:02:00 UTC

[jira] [Commented] (LUCENE-10298) dev-tools/scripts/addBackcompatIndexes.py doesn't work well with spotless

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

Dawid Weiss commented on LUCENE-10298:
--------------------------------------

I wouldn't make such exceptions. They're hard to maintain... A better solution would be to read this list from a resource instead. A hacky way would be to force the line break with a // comment after the bracket and
{code}
static final String oldNames = {
  // auto-updated list starts here
  "xxxx"
  // list ends here.
}
{code}

> dev-tools/scripts/addBackcompatIndexes.py doesn't work well with spotless
> -------------------------------------------------------------------------
>
>                 Key: LUCENE-10298
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10298
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Adrien Grand
>            Priority: Minor
>
> addBackcompatIndexes.py expects that lists of index names have one entry per line, e.g.
> {code}
> static final String oldNames = {
>   "xxxx"
> }
> {code}
> However, when the array is small, Spotless forces the array to be written on a single line, and addBackcompatIndexes.py no longer recognizes the structure of the file.
> It's probably fixable, but my Python skills are not good enough. Or maybe this file should be one of the rare ones that we exclude from Spotless?



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org