-
Notifications
You must be signed in to change notification settings - Fork 397
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
fix: Disable unused import check to prevent false positives in init function #3929
base: master
Are you sure you want to change the base?
Conversation
🛠 PR Checks Summary🔴 Pending initial approval by a review team member, or review from tech-staff Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
@notJoon , please fix the failed CI checks. |
Description
There is a tendency for an unused error to occur when calling a package in the
init
function, even though it is actually being used. This issue appears to arise during the type-checking process performed by thego/types
'Config.Check
method.Cause Analysis
It is suspected that this occurs because the
types.Info
structure is not provided (passed asnil
) when callingCheck
, preventing the collection of detailed usage information.Temporary Solution
The
DisableUnusedImportCheck: true
option has been added totypes.Config
to disable the unused import check. This serves as a temporary solution to prevent the unused error.Future Improvements
types.Info
structure:e.g.,
init
function:init
function.init
function dependencies when constructing the dependency graph.These fundamental improvements must be addressed in the future.
Call Stack
lintTypeCheck -> TypeCheckMemPackageTest -> typeCheckMemPackage -> gnoImporter.parseCheckMemPackage -> types/config.Check
Related Issue