apps-projectcenter icon indicating copy to clipboard operation
apps-projectcenter copied to clipboard

sanitize uppercase filenames used in headers when adding new files to the project

Open buzzdeee opened this issue 1 year ago • 0 comments

For #define something in C, only alphanumeric and _ are allowed.

When creating a new file in the project, esp. headers, some ifdef dance is added, to prevent double inclusion. This take the file name literally.

For Categories, it's common to use NSSomeClass+Category as name, and that + sign breaks build.

Therefore sanitize the generated uppercase header file name, replace any non alphanumeric and _ with _ before replacing the string in the template.

buzzdeee avatar Aug 30 '24 21:08 buzzdeee