-
Notifications
You must be signed in to change notification settings - Fork 39
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
Feature Request: Identify unused imports #51
Comments
Note, this may not be that simple due to uses of kubernetes-formula/kubernetes/kubectl/config/environ/install.sls: {%- from tplroot ~ "/map.jinja" import kubernetes as k8s with context %} prometheus-formula/prometheus/archive/install.sls: {%- from tplroot ~ "/map.jinja" import prometheus as p with context %}
|
A similar issue is unused Jinja variables. lighttpd-formula/lighttpd/config.sls@4fca60f {% set file = lighttpd.get('config', ['lighttpd.conf']) %}
lighttpd-formula/lighttpd/config.sls@e69c9a0 - source: {{ files_switch('lighttpd', ['/etc/lighttpd/' ~ file,
'/etc/lighttpd/' ~ file ~ '.jinja']) }} It would be great if |
Thanks @myii for the feature request! This requires |
@roaldnefs Great, thanks for all of your hard work. |
Taking this example:
{% from "zabbix/macros.jinja" import files_switch with context -%}
files_switch
isn't actually used anywhere in the file, so should be removed.I've actually come across many of these examples throughout SaltStack Formulas. Would be great if
salt-lint
could catch these.The text was updated successfully, but these errors were encountered: