janhoy commented on code in PR #4499:
URL: https://github.com/apache/solr/pull/4499#discussion_r3361011670
##########
gradle/validation/rat-sources.gradle:
##########
@@ -35,6 +35,12 @@ allprojects {
description = 'Runs Apache Rat checks.'
def defaultScanFileTree = project.fileTree(projectDir, {
+ // Only check files tracked by git — skip .gitignore-d files (IDE
artifacts, AI assistant configs, etc.)
+ def trackedFiles = ["git", "ls-files", "--cached"].execute(null,
projectDir).text.trim().split("\n").toList().toSet()
+ exclude { element ->
+ !element.isDirectory() &&
!trackedFiles.contains(element.relativePath.pathString)
Review Comment:
Re-written and added an inline comment explaining the logic
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]