dsmiley commented on code in PR #4499:
URL: https://github.com/apache/solr/pull/4499#discussion_r3359709386
##########
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:
this line confuses me
##########
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()
Review Comment:
our build uses jgit elsewhere so why not here?
--
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]