DaisyExamples icon indicating copy to clipboard operation
DaisyExamples copied to clipboard

helper.py Copy operation can introduce bugs

Open CorvusPrudens opened this issue 4 years ago • 1 comments

During the copy operation of helper.py, the source code can be opened and modified by the rewrite_replace function. This is not ideal of the project name is, say, QSPI, and a macro is called DSY_QSPI_BSS (the QSPI would be replaced by the new project name). There should probably just be a check that excludes files with .cpp or .h extensions.

Also, line 122 is mistakenly formatted as if it were a C printf.

CorvusPrudens avatar Sep 07 '21 19:09 CorvusPrudens

Good catch, should be easy to fix.

I'm down with a generic "don't open .h/.c/.s/.cpp" rule. The file name should still be replaced, but none of the contents need be changed. Can't think of a case where that'd be desirable anyway.

stephenhensley avatar Sep 07 '21 20:09 stephenhensley