Skip to content

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

Open
@raddessi

Description

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?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions