Skip to content
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

"Project Checks whitespace error" check is not particularly helpful #16

Open
apostasie opened this issue Aug 12, 2024 · 6 comments
Open

Comments

@apostasie
Copy link

Description

Sometimes, you will get a fail on the CI from project checks complaining that FAIL - has whitespace errors. See git show --check 30bfe29f9810b8c743a6068dd30e61398785f1ed.

But then, it does not say what is a whitespace error, where that would be, why any of it is actually bad, and most importantly:

git show --check 30bfe29f9810b8c743a6068dd30e61398785f1ed
fatal: bad object 30bfe29f9810b8c743a6068dd30e61398785f1ed

So:

  • is this check serving a purpose? is it useful in any way? what exactly is it doing? what is it complaining about?
  • if yes to the above, we should fix it so that it does provide usable / actionable feedback

Steps to reproduce the issue

na

Describe the results you received and expected

na

What version of nerdctl are you using?

main

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

@apostasie
Copy link
Author

Apologies for the rant.

I know what it does. It checks for spurious trailing whitespaces in markdown documents.

It is still unhelpful IMHO, and making it harder for newcomers to contribute, on the simplest things.

I do not see the point of annoying everyone about trailing whitespace in documentation.

@AkihiroSuda AkihiroSuda transferred this issue from containerd/nerdctl Aug 12, 2024
@AkihiroSuda
Copy link
Member

I'd prefer to keep this check, but I agree that this needs a better error message

@estesp
Copy link
Member

estesp commented Aug 12, 2024

I'm more curious why a commit you pushed to GitHub is no longer available in your local environment; that's the only way that git would respond with bad object on a commit you made to a repo. I've never had that happen, and while it has been 10 years since I was "introduced" to a project that was running the whitespace checks, I've never gotten the bad object, although I've probably committed 100s of whitespace errors in that timeframe and needed to run git show --check to find out where it was.

@apostasie
Copy link
Author

Hey @estesp

I would just ignore that aspect.
Probably I did amend for some other reason, or otherwise PEBKAC this, before calling git show.

If this is illustrating anything, it is that even that is not particularly helpful in finding what the problem is from the user perspective…

@apostasie
Copy link
Author

@estesp

This here:
containerd/nerdctl#3406

Adds one commit:
2606a2ae655bd6ed0a30d08cf6f692a7189b597a

The logs visible in:

https://github.com/containerd/nerdctl/actions/runs/10692283248/job/29640410617?pr=3406

Say:

3813d15 "Merge 2606a2ae655bd6ed0a30d08cf6f692a7189b597a into 51258bde840f12ac1a4b9f7ee7a5b64cdc571832" ... FAIL

FAIL - has whitespace errors. See git show --check 3813d15dd62f97e2045ff74d46b9f007a36e21f0.

3813d15dd62f97e2045ff74d46b9f007a36e21f0 is (of course?) not on my local copy.

I am a bit lost at what is happening here.
Apologies if I am missing something obvious.
Would you be able to have a quick look here and help with this?

Thanks in advance.

@apostasie
Copy link
Author

Also git show 2606a2ae655bd6ed0a30d08cf6f692a7189b597a is a happy-camper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants