You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "janhoy (via GitHub)" <gi...@apache.org> on 2023/04/03 21:22:00 UTC

[GitHub] [solr] janhoy commented on a diff in pull request #1537: Tolerate comments in versions.props

janhoy commented on code in PR #1537:
URL: https://github.com/apache/solr/pull/1537#discussion_r1156468897


##########
gradle/validation/versions-props-sorted.gradle:
##########
@@ -21,7 +21,7 @@ configure(rootProject) {
   task versionsPropsAreSorted() {
     doFirst {
       def versionsProps = file('versions.props')
-      def lines = versionsProps.readLines("UTF-8")
+      def lines = versionsProps.readLines("UTF-8").stream().filter(l -> !l.startsWith("#")).collect(java.util.stream.Collectors.toList())

Review Comment:
   Yea, the code below writes out a sorted file to the build area, but in that file, all `#` lines will be on top or something, so it is useless. Perhaps better just throwing the exception and asking a human to fix the sorting!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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