Add support for sconstruct and sconscript extensions#563
Add support for sconstruct and sconscript extensions#563seanbudd wants to merge 3 commits intopre-commit:mainfrom
Conversation
identify/extensions.py
Outdated
| 'sconstruct': {'text', 'scons'}, | ||
| 'sconscript': {'text', 'scons'}, |
There was a problem hiding this comment.
doesn't scons have a funny capitalization convention for these files?
There was a problem hiding this comment.
yes - the file names can be mixed caps. I guess these dictionaries aren't case insensitive then?
There was a problem hiding this comment.
The leading SC are conventionally capitalized, so it'd be best to integrate them as such. I'd also recommend adding SCsub, as that's an alias for SConscript used by Godot repositories
| 'sconstruct': {'text', 'scons'}, | |
| 'sconscript': {'text', 'scons'}, | |
| 'SConstruct': {'text', 'scons'}, | |
| 'SConscript': {'text', 'scons'}, | |
| 'SCsub': {'text', 'scons'}, |
There was a problem hiding this comment.
Thanks for catching this. Is the capitalisation just to match the defacto standard or is this handled in a case sensitive manner as well? Will I need to rename our files to capitalise them correctly for them to be caught by precommit
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>
Repiteo
left a comment
There was a problem hiding this comment.
Would be handy indeed!
Leaving it at {'text', 'scons'} feels like the appropriate choice, as that's in-line with .pyi and .ipynb also not being assigned to python by default.
Scons scripting support: https://scons-cookbook.readthedocs.io/en/latest/#sharing-variables-between-sconscript-files
These are files named sconstruct or sconscript.
It might be worth including them with python, but that might cause some tools to break by default, as it's not normal python code.