-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
whitespace_test: fix exclusion of debian directory #5435
Conversation
These tests are supposed to ignore trailing whitespace in files in the debian directory. However this is not the case with the current exclude pattern and usage of `git grep`. Use --full-name with `git grep` to ensure its output is always relative to the repository root, rather than the current directory. Additionally remove the leading slash from the exclude pattern as this will never match the output.
Hi @deastoe, what is this |
Hi @alexey-tikhonov, I maintain SSSD packages in a Debian derivative, hence have a debian directory in the repository root. This test was failing in some custom build environments, due to whitespace in files below that directory - so it is a downstream issue. I am guessing that it is the debian packaging directory that the test is intending to ignore, but I'm not sure why it was explicitly ignored. It looks like it has been in place since the test was added: cbff3fc. Even back then I don't see a debian directory in the source tree. |
Hi,
I'm not sure... Should this really be handled upstream? Btw, do you know how Debian maintainer handles this? They should have the same issue as you, right? |
Absolutely - I do already apply this as a patch. re. Debian it looks like they also now have an identical patch: https://salsa.debian.org/sssd-team/sssd/-/blob/master/debian/patches/fix-whitespace-test.diff. (I didn't realise this as we use older packaging based on Debian stable). |
From my point of view, this is preferable. Downstream will have to update their patches, but that shouldn't be too troublesome. |
I talked to tjaalton and he's fine with removing it completely. @deastoe would you like to update this PR or shall we? |
as this is downstream specific. See discussion in SSSD#5435 for details
Superseded by #5592 |
…stream specific. See discussion in #5435 for details Reviewed-by: Pavel Březina <pbrezina@redhat.com>
…stream specific. See discussion in SSSD#5435 for details Reviewed-by: Pavel Březina <pbrezina@redhat.com>
These tests are supposed to ignore trailing whitespace in files in
the debian directory. However this is not the case with the current
exclude pattern and usage of
git grep
.Use --full-name with
git grep
to ensure its output is alwaysrelative to the repository root, rather than the current directory.
Additionally remove the leading slash from the exclude pattern as
this will never match the output.