Skip to content

Fix exclude-file-types for known files#465

Merged
kehoecj merged 3 commits into
Boeing:mainfrom
Mak-1911:fix/exclude-file-types-known-files
May 4, 2026
Merged

Fix exclude-file-types for known files#465
kehoecj merged 3 commits into
Boeing:mainfrom
Mak-1911:fix/exclude-file-types-known-files

Conversation

@Mak-1911
Copy link
Copy Markdown
Contributor

@Mak-1911 Mak-1911 commented May 1, 2026

PR summary:
Fixes #456

Summary

  • Apply --exclude-file-types after resolving file type
  • Exclude known files like .gitconfig and justfile by resolved type
  • Add regression tests and update docs/test expectations

Test

  • go test ./pkg/finder -run "Test_fsFinderExcludeFileTypes|Test_fsFinderKnownFiles|Test_fsFinderLinguistKnownFiles"

Please let me know if there are any further fixes or ammends to make.

@Mak-1911 Mak-1911 requested a review from a team as a code owner May 1, 2026 03:13
@kehoecj kehoecj added the OSS Community Contribution Contributions from the OSS Community label May 1, 2026
Copy link
Copy Markdown
Collaborator

@kehoecj kehoecj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Code looks good. Testing confirms this change has addressed the issue. A few things before we can merge:

  1. Create a changelog entry under [Unreleased] for this bug fix
  2. You'll need to generate and commit the new linguist data. I just created #466 so MR authors won't have to do it on future submissions but you'll have to run the below commands to get the job to pass for now:
  go generate ./pkg/filetype/...
  git add pkg/filetype/known_files_gen.go
  git commit -m "chore: regenerate known files from Linguist"

@kehoecj kehoecj added the pr-action-requested PR is awaiting feedback from the submitting developer label May 1, 2026
@Mak-1911
Copy link
Copy Markdown
Contributor Author

Mak-1911 commented May 2, 2026

Addressed, thanks.

  • Added an Unreleased changelog entry
  • Ran go generate ./pkg/filetype/... and committed the regenerated known_files_gen.go.

Let me know if this needs more fixes or additions.

@kehoecj kehoecj merged commit ca90fb0 into Boeing:main May 4, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OSS Community Contribution Contributions from the OSS Community pr-action-requested PR is awaiting feedback from the submitting developer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--exclude-file-types doesn't exclude extensionless known files

2 participants