Remove shebang-based file detection - #2701
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Deprecate inspection of shebang lines to improve performance
Remove shebang-based file detection
Oct 1, 2026
DanielNoord
reviewed
Oct 1, 2026
| assert not self.instance.is_supported_filetype(str(does_not_exist)) | ||
|
|
||
| def test_is_supported_filetype_shebang(self, tmp_path: Path) -> None: | ||
| def test_is_supported_filetype_unsupported_shebang(self, tmp_path: Path) -> None: |
Contributor
Author
There was a problem hiding this comment.
Removed the shebang-specific test in commit 2016836.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2701 +/- ##
==========================================
- Coverage 99.41% 99.41% -0.01%
==========================================
Files 41 41
Lines 3235 3229 -6
Branches 689 689
==========================================
- Hits 3216 3210 -6
Misses 12 12
Partials 7 7 🚀 New features to boost your workflow:
|
Co-authored-by: DanielNoord <13665637+DanielNoord@users.noreply.github.com>
Co-authored-by: DanielNoord <13665637+DanielNoord@users.noreply.github.com>
DanielNoord
force-pushed
the
copilot/deprecate-inspection-of-shebang-lines
branch
from
October 1, 2026 20:33
2016836 to
4edd9e1
Compare
DanielNoord
enabled auto-merge
October 1, 2026 20:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Shebang inspection opened extensionless files during file-type detection, adding significant overhead. Remove this fallback; extensionless shebang files are no longer automatically supported.
Config.is_supported_filetype. Supported and blocked extensions, editor-backup handling, and FIFO checks remain unchanged.Config().is_supported_filetype("myscript")now returnsFalse, even when the file starts with#!/usr/bin/env python. Use a supported extension or configuresupported_extensionsfor other file types.