Add IDExxx rule for converting multiline string to raw string
See original GitHub issueCurrently there is only “Convert to raw string” code refactoring with fix-all support (weird. How can a refactoring has fix all? I doesn’t fix anything). Using this fix-all is not much helpful as it converts all strings to raw form, even simple single-line onse, e.g. "a"
-> """a"""
. It would be a lot more helpful if there is an IDExxx
rule for converting only multiline strings to raw form, .e.g
@"First line
Second line
"
to
"""
First line
Second line
"""
Such rule should check for language version and probably be suggestion by default.
Issue Analytics
- State:
- Created 10 months ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Multiline String to raw string Python
I have a multiline string. I need to convert that string to raw string without using r' ' while declaring the variable. My...
Read more >Multiline string literal tips and tricks
A few features that make Swift's multiline string literals really useful. ... You can use it to: - Convert images into animations.
Read more >C# 11.0 new features: raw string literals
C# 11.0 adds various improvements to string literals. In this post, Ian explains how raw string literals can make your code more readable....
Read more >Raw string literals
The following rules govern the interpretation of a multi-line raw string literal: Both opening and closing quote characters must be on their own ......
Read more >Raw Strings, UTF-8 Strings, and Multiline Interpolations
This second post will walk you through raw strings, multiline string interpolation, and the new UTF-8 string literals.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I don’t suggest to convert this refactoring to codefix entirely. My proposal is to leave refactoring for singleline strings (probably without fix all as it would probably have very limited scope of usages) and make
IDExxx
rule only for multiline casesSure it can. It’s the scopes that the code fixup is applied to. ‘fix’ doesn’t mean “broken”. It’s akin to “fixing lunch” 😃