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

Provide functionality to detect "improper qualified access" #50

Merged
merged 17 commits into from
May 25, 2024

Conversation

ericphanson
Copy link
Owner

@ericphanson ericphanson commented May 24, 2024

closes #48

I think I've got the rough functionality working:

julia> ExplicitImports.improper_qualified_names_nonrecursive(ExplicitImports)
1 issues with qualified names were found:
- `parent` has parentmodule AbstractTrees but it was accessed from ExplicitImports at /Users/eph/ExplicitImports/src/qualified_names.jl:78:21

It isn't clear to me whether or not what matters is parentmodule, which, or maybe in 1.11, ispublic... I might mark this experimental and choose to change the criteria later.

before merging, needs:

  • tests
  • docstring

and possibly in a followup:

  • recursive variant
  • check_ variant

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 44 lines in your changes are missing coverage. Please review.

Project coverage is 90.60%. Comparing base (d46bc8e) to head (ddef68e).

Files Patch % Lines
src/qualified_names.jl 0.00% 44 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #50      +/-   ##
==========================================
- Coverage   96.47%   90.60%   -5.87%     
==========================================
  Files           5        6       +1     
  Lines         680      724      +44     
==========================================
  Hits          656      656              
- Misses         24       68      +44     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ericphanson ericphanson changed the base branch from main to eph/fix-bug May 25, 2024 16:10
Base automatically changed from eph/fix-bug to main May 25, 2024 16:15
@ericphanson ericphanson merged commit ba63bec into main May 25, 2024
5 checks passed
@ericphanson ericphanson deleted the eph/wrong-qualifier branch May 25, 2024 16:21
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.

Detect usage of names from Modules that don't own them
2 participants