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

salt sls files with python shebangs are not properly recognized #61

Open
raddessi opened this issue Nov 9, 2018 · 2 comments
Open

salt sls files with python shebangs are not properly recognized #61

raddessi opened this issue Nov 9, 2018 · 2 comments

Comments

@raddessi
Copy link

raddessi commented Nov 9, 2018

Some salt sls files are written in python directly, I've added those interpreters in a PR here #60 as well as disabled the executable checks since these files are not required to be and also disabled the optimization for skipping peeking at the file contents if we recognize the extension.. I do see how this a nice speedup though.. maybe the extensions.EXTENSIONS dict should be changed from:

EXTENSIONS = {
...
    'sh': {'text', 'shell'},
    'sls': {'text', 'salt'},
    'so': {'binary'},
...
}

to something like:

EXTENSIONS = {
...
    'sh': {
        'tags': {'text', 'shell'},
        },
    'sls': {
        'tags': {'text', 'salt'},
        'always-peek': True,
    },
    'so': {
        'tags': {'binary'},
    },
...
}

By changing each value to its own dict which could have an optional key always-peek(?) so then you could .get('always-peek', False) to check if the file should be inspected?

@raddessi
Copy link
Author

raddessi commented Nov 9, 2018

Hmm, let me fix those failing unit tests first..

@raddessi
Copy link
Author

raddessi commented Nov 9, 2018

Should be happy now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant