Skip to content

Conversation

@epage
Copy link
Collaborator

@epage epage commented Aug 28, 2025

This reverts commit 4eeb460.

Original PR: #684

Original Issue: #683

This didn't cause go.mod to be ignored instead it caused it to not be counted as go code.
However, go.mod and go.work are similar file types and both are more of package specifications than lock files or other machine-only content.

See #1363

This reverts commit 4eeb460.

Original PR: crate-ci#684

Original Issue: crate-ci#683

This didn't cause `go.mod` to be ignoredinstead it caused it to not be
counted as go code.
However, `go.mod` and `go.work` are similar file types and both are more
of package specifications than lock files or other machine-only content.

See crate-ci#1363
@epage epage mentioned this pull request Aug 28, 2025
@coveralls
Copy link

Pull Request Test Coverage Report for Build 17303202645

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 20.434%

Totals Coverage Status
Change from base Build 17212446462: 0.0%
Covered Lines: 574
Relevant Lines: 2809

💛 - Coveralls

@ccoVeille
Copy link
Contributor

Nitpicking: I would fix the typo in commit message

ignoredinstead should be ignored instead

@ccoVeille
Copy link
Contributor

Is there a need to add go.sum and go.work.sum to ignored files ?

@epage
Copy link
Collaborator Author

epage commented Aug 28, 2025

Is there a need to add go.sum and go.work.sum to ignored files ?

Those are in the lockfile type which is not checked

@epage epage merged commit e7e8a1a into crate-ci:master Aug 28, 2025
21 checks passed
@epage epage deleted the go branch August 28, 2025 19:04
@ccoVeille
Copy link
Contributor

This change equivalent to add locally add go.mod and go.work to extends glob for type go, right?

Because when I try it locally it reports typos for go.mod files

Try this one

https://github.com/noborus/ov/blob/master/go.mod

Maybe I'm wrong, but I prefer to ask.

@epage
Copy link
Collaborator Author

epage commented Aug 28, 2025

Yes, this makes *.go, go.mod, and go.work all the same file type. Unless you have some go-specific config in place, this shouldn't really change much.

@ccoVeille
Copy link
Contributor

Is there a need to add go.sum and go.work.sum to ignored files ?

Those are in the lockfile type which is not checked

Indeed. I didn't see it.

Yes, this makes *.go, go.mod, and go.work all the same file type. Unless you have some go-specific config in place, this shouldn't really change much.

Then, it reports errors.

I feel like in .go files everything is checked, and not only comments.

But we expect something different for go.mod and go.work where we only need to check comment.

Please try with the go.mod file I provided

@epage
Copy link
Collaborator Author

epage commented Aug 28, 2025

I feel like in .go files everything is checked, and not only comments.

typos works off of all file contents and has no knowledge of individual file types grammars, including comments.

@ccoVeille
Copy link
Contributor

I feel like in .go files everything is checked, and not only comments.

typos works off of all file contents and has no knowledge of individual file types grammars, including comments.

Oh OK. Then I would exclude go.mod and go.work totally.

That's what I did for many projects.

@ccoVeille
Copy link
Contributor

I just saw your comment here.

this just becomes a hash detection issue.
Originally posted by @epage in #1363 (comment)

You are right. Let's continue the discussion in #1363

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

Successfully merging this pull request may close these issues.

3 participants