Closed harshraj8843 closed 1 year ago
!assign
Hey @hi-Kartik2004, !assign
command is only for good first issue
!!!
Please choose another issue.
Thanks for your interest in contributing to this project.
Hey @hi-Kartik2004
Any idea why it is happening 🤔
Hey @harshraj8843, I've tested the script out, and according to my testing, the script ran well and has no bugs, According to me, two different branches being merged that have the same file might have caused the issue as the file that is to be renamed already exists.
Note: this happens only when Someone adds an additional "
For example: If a contributor contributes a file to the folder find-string-length in cpp language with file name "calculate_string_len.cpp" The rename.py script will rename it to FindStringLength (i.e The folder name as per the naming convention specified in data/languages.json), But if another contributor tries to contribute another .cpp file to solve the same problem the rename.py script will not do anything as the FindStringLength.cpp file already exists and two files cannot have the exact same names with the same extensions. hence the extra file added by merging a branch that has an excess file for the same program in the same language that exists already will not be renamed.
PS: The script doesn't delete the additional file that exists in the folder. I've added this functionality in PR codinasion/program#5813
Description
The
rename file script
is creating new files instead of renaming themhttps://github.com/codinasion/program/blob/ad631886f3a8a59df7e10e0a2edb3b5493669a0d/scripts/rename_files.py#L72-L80
Additional information
See 👉🏻 https://github.com/codinasion/program/commit/ad631886f3a8a59df7e10e0a2edb3b5493669a0d
Code of Conduct