[ 
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-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to