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. Please verify. ########## 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"; + } else { + String home = System.getenv("HOME"); + if (home == null) { + home = ""; + } + return home + File.pathSeparator + ".config" + File.pathSeparator + "git" + File.pathSeparator + "ignore"; + } + } Review Comment: Have you tested this on a windows system? I just got back from FOSDEM and am trying to clean up a bad merge so I can't check this right now but, I think that the slashes are required to be "/" in this pattern list. There are methods that will convert them for you -- but again that is in the code I am trying to fix. -- 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