clang-format-action icon indicating copy to clipboard operation
clang-format-action copied to clipboard

Add option for customizing file extensions

Open Krzmbrzl opened this issue 3 years ago • 1 comments

Now that the last issue is resolved, let me continue complaining :D

It would be nice if there was an additional option to this action that would allow to specify a set of file extensions for files to check. This could default to the current list of files, but gives the user more flexibility in terms of which files are to be checked by this action. In that step it would probably also be nice to make the regex parsing used for finding the files with given extension case-insensitive, such that one does not have to worry about casing when specifying file extensions.

Krzmbrzl avatar Jan 15 '22 11:01 Krzmbrzl

This would be good for Objective-C which uses *.m and *.mm file extension for implementation files.

nmoinvaz avatar Jun 06 '22 18:06 nmoinvaz

I would also like this. Our codebase uses a lot of CUDA and so we need to be able to format .cu and .hu files.

bcaddy avatar Nov 11 '22 21:11 bcaddy

If anyone needs a fork adding .m files: https://github.com/scosman/clang-format-action . Note: this just statically adds .m, not option to customize as this issue requests.

Use this line in your yml: uses: scosman/[email protected]

But agree, official support for a custom extension list would be ideal!

scosman avatar Dec 17 '22 18:12 scosman

Addressed in #125 🙂. Sorry that it took so long for me to get around to this! 4.10.0 release contains this feature.

jidicula avatar Dec 27 '22 20:12 jidicula