← 返回首页
salt sls files with python shebangs are not properly recognized · Issue #61 · pre-commit/identify · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

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

New issue
New issue

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Footer

      © 2026 GitHub, Inc.