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

ast/compile: unused imports follow up #4427

Commits on Mar 23, 2022

  1. ast/compile: cover edge cases for checking unused imports

    * keep future imports untouched in check for unused imports
    
      Rationale: you might start out with a default header when creating a new
      rego policy -- there shouldn't be anything stopping you from using all the
      latest features then.
    
    * capture unused imports that are shadowed
    
      This would pretty much copy the work done in resolveAllRefs; so the extra
      check done as part of resolveAllRefs is advantageous:
    
      - we capture the cases when extra modules are lazily loaded
      - we don't walk all the code twice
    
    Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
    srenatus committed Mar 23, 2022
    Configuration menu
    Copy the full SHA
    9e71a27 View commit details
    Browse the repository at this point in the history