MantisBT - Doomseeker | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0003809 | Doomseeker | [All Projects] Cleanup | public | 2020-06-07 03:54 | 2020-06-08 01:04 |
| Reporter | WubTheCaptain | ||||
| Assigned To | |||||
| Priority | none | Severity | tweak | Reproducibility | sometimes |
| Status | confirmed | Resolution | open | ||
| Platform | OS | OS Version | |||
| Product Version | 1.3.1 | ||||
| Target Version | Fixed in Version | ||||
| Summary | 0003809: Some string literals with escaped characters are not raw string literals (modernize-raw-string-literal) | ||||
| Description | Ugly escape characters in some source code, impeding readability. | ||||
| Steps To Reproduce | Some examples from a common regex:$ grep -r "a-z" src/
src/plugins/zandronum/zandronumserver.cpp:const QRegExp ZandronumVersion::versionExpression(R"((\d+).(\d+)(?:.(\d+)(?:.(\d+))?)?(?:-([a-zA-Z]*)?)?(?:-r(\d+)(?:-(\d+))?)?)");
src/plugins/zandronum/zandronumrconprotocol.cpp: static const QRegExp colorCode(R"(\\c(\[[a-zA-Z0-9]*\]|[a-v+\-!*]))");
src/core/gui/widgets/serverconsole.cpp: static const QRegExp colorCode("\034(\\[[a-zA-Z0-9]*\\]|[a-v+\\-!*])");
src/core/irc/ircnicknamecompleter.cpp: const QString NICKNAME_MATCH = R"(\[\]\{\}\-\^\`\|\\A-Za-z0-9_)";
src/core/commandline.cpp: QRegExp reallySafestCharsIHope = QRegExp("[^a-z0-9/\\_-+]",
Qt::CaseInsensitive);
src/core/serverapi/serverstructs.cpp: return name.toLower().remove(QRegExp("[^a-z0-9]"));Notice serverconsole.cpp and commandline.cpp containing a double backslash (escape characters). Some of these may be better as raw string literals: $ grep -r '\\\"' src/ | wc -l 127 | ||||
| Additional Information | 'https://clang.llvm.org/extra/clang-tidy/checks/modernize-raw-string-literal.html [^]' | ||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | |||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2020-06-07 03:54 | WubTheCaptain | New Issue | |||
| 2020-06-07 03:56 | WubTheCaptain | Note Added: 0021362 | |||
| 2020-06-07 19:57 | Pol M | Status | new => confirmed | ||
| 2020-06-08 01:04 | Blzut3 | Note Added: 0021404 | |||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||