enh(build): sheldon for CUDA
Description
Sheldon cannot format CUDA files, which is a bit troublesome for me.
Proposal
See this patch sheldon_cuda.patch for changes. It's slightly outdated because I was on an old version of sheldon.
WARNING: my lazy past self did not want to add an extra if
, and wrote this line instead:
command = UNCRUSTIFY_PATH + ' -c ' + config_file + ' -q %s ' + source_file + ' -l CPP'
This is to get uncrustify parse CUDA files as C++ files (for linting), but this breaks stuff for C.
Note: Uncrustify does not support CUDA kernel launch <<<blocks, thread_per_blocks, shared_memory_size, stream>>>
and lints those <<<
to << <
.
I don't think this is reasonable to patch this ourselves but I still wanted to mention that.
Functional specifications
Sheldon lints CUDA files properly (or the closest to properly possible).
Technical specifications
Apply the patch...
Test plan
Run sheldon on repositories with CUDA files.
Edited by Flavien BRIDAULT