question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Exceptions for String Constant Overuse

See original GitHub issue

Rule request

I feel it would be good to be able to declare exceptions for WPS226

Thesis / Reasoning

In a file on a current project, I tend to use " ".join(iterable) a lot. It feels unnatural to declare a CONSTANT for that. Also, I don’t think it is good in this case to disable WPS226 for the entire file as there could be other common string constants.

Alternative: Excluse " ", "", "\n" & friends from this by default.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
lensvolcommented, Oct 6, 2020

Can I take this over?

1reaction
sobolevncommented, Sep 13, 2020

Hi, @sumeshpradhan! Thanks a lot!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Java constant string too long Exception - Runtime
add a catch clause with the specific exception that is thrown during the runtime, and inside the clause the handling code for it....
Read more >
Top 15 C++ Exception handling mistakes and how to avoid ...
MEASURE for yourself and then make a call. Think about what you're losing out by not using exceptions. If you hit a performance...
Read more >
What is wrong with magic strings?
What typically distinguishes acceptable "constants" from "magic values" is some violation of one or more of these rules. Used well, constants ...
Read more >
How to create user-defined exceptions with localized ...
Create a serializable class that inherits from Exception. The class name should end in "Exception": C# Copy · Add the default constructors: C#...
Read more >
How To Use Python Raw String | DigitalOcean
You can create a raw string in Python by prefixing a string literal with r or R . Python raw string treats the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found