salt sls files with python shebangs are not properly recognized
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start with the proposed changes in pull request #60 and inspect the extensions.EXTENSIONS mapping described in the issue. Trace how .sls files are classified, including executable checks and the extension-based content-peek optimization. Done means Python-shebang Salt SLS files are recognized without requiring executable permissions.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Some salt sls files are written in python directly, I've added those interpreters in a PR here https://github.com/chriskuehl/identify/pull/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?
- Lingua principale
- Python
- Stelle
- 297
- Fork
- 179
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pre-commit/identify
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
pre-commit/identify#103 · 2 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
pre-commit/identify#72 · 1 commento ·
Tutte le issue di pre-commit/identify
Issue simili
-
documentation help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
simonw/sqlite-utils#872 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100