[
https://issues.apache.org/jira/browse/RAT-578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18145203#comment-18145203
]
ASF subversion and git services commented on RAT-578:
-----------------------------------------------------
Commit 147b273951c3d8e88696f13cd02d277a797e9cdd in creadur-rat's branch
refs/heads/fix/RAT-592 from Romain Manni-Bucau
[ https://gitbox.apache.org/repos/asf?p=creadur-rat.git;h=147b27395 ]
RAT-578: Address review comments on GitConfig and home resolution
Nest GitConfig into GitIgnoreBuilder as a protected static final inner class
so the git-config reading logic stays co-located with its only consumer while
remaining independently unit-testable from the same-package test class.
Remove the USERPROFILE/USER_PROFILE environment variable handling and resolve
the home directory from the user.home system property only. On modern JVMs
(JDK 8+) user.home is derived from the OS home/profile location on every
platform, so no platform specific environment variable lookup is needed.
Deduplicate include and excludesFile resolution into a single resolve(value,
base) helper: [include] path values are resolved against the directory of the
including file and core.excludesFile values against the current working
directory, matching git.
Derive the home directory prefix from FSInfo.getDefault().dirSeparator()
instead of a hardcoded "~/", while still accepting the alternate separator so
portable git configuration files (which may use either / or \) resolve on any
host.
Keep GIT_CONFIG_GLOBAL as a single file path, matching git: empirical testing
shows git treats the value as one pathname and a newline-separated value fails
to load, contrary to git-var(1) output formatting.
Full apache-rat-core build passes: 1155 tests, checkstyle and javadoc clean.
> RAT doesn't consider excludesfile in ~/.gitconfig so it fails unexpectedly
> when merging gitignores and explicit ignores
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: RAT-578
> URL: https://issues.apache.org/jira/browse/RAT-578
> Project: Apache RAT
> Issue Type: Improvement
> Components: scan
> Affects Versions: 0.18
> Reporter: Romain Manni-Bucau
> Priority: Major
> Fix For: 0.19
>
>
> Pls see discussion in the PR!
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)