Claudenw commented on code in PR #433: URL: https://github.com/apache/creadur-rat/pull/433#discussion_r1939040607
########## apache-rat-core/src/main/java/org/apache/rat/config/exclusion/StandardCollection.java: ########## @@ -310,4 +310,18 @@ public boolean hasStaticDocumentNameMatcher() { } return false; } + + /** The location of the global gitignore file to process */ + private static String globalGitIgnore() { + String xdgConfigHome = System.getenv("XDG_CONFIG_HOME"); + if (xdgConfigHome != null && !xdgConfigHome.isEmpty()) { + return xdgConfigHome + File.pathSeparator + "git" + File.pathSeparator + "ignore"; Review Comment: ~~Are you certain that the default GIT process is to ignore `XDG_CONFIG_HOME` if it is empy? An empty `XDG_CONFIG_HOME` could be a way to ignore the `HOME` based isgnore.~~ Never mind the above comment. You are correct. However, for complete implementation you need to read a file specified by `core.excludesFile` in the user’s `~/.gitconfig`. I am also concerned about doing this automatically. It feels like it should be part of the `GitIgnoreProcessor`. So that users can turn it on/off. We also need to think long and hard about reading files outside of the current directory tree. The `GitIgnoreProcessor` is currently undergoing changes which I hope we will have completed by the end of the week. The problem is a massive PR that I am breaking out into smaller reviewable chunks. Once that is completed, and if you are willing to write the code to read the `~/.giconfig` we can then merge this into the `GitIgnoreProcessor`. -- 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: dev-unsubscr...@creadur.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org