[IG] Hardcoded file separator should be more selective

This string: " (save/update): \n" is marked as containing a hard-coded file
separator.
Clearly, this string is not specifying a file system path.
If a string contains characters that make it an invalid file path
specification, then the hardcoded file separator rule should not be applied
to that string.

Thanks,

Tim


2 comments
Comment actions Permalink


A good idea, but difficult to do in a cross-platform way. Do I take the intersection of all invalid file characters across all platforms, or the union? In any case, my expectation with "Hardcoded file separator" is that it's one of those (few) inspections that are expected to have false positives occasionally, and that developers will just have to accept that. A perfect code inspection platform would have some way of marking these as "to be ignored", but you'll have to talk to JetBrains about that.

--Dave Griffith

0
Comment actions Permalink

Good point.

I strive to have all my files end up with a green box. So any false
positives get my attention repeatedly.

I added some votes to:
http://www.intellij.net/tracker/idea/viewSCR?publicId=3665 regarding "to be
ignored".

Thanks,

Tim

"Dave Griffith" <dave.griffith@cnn.com> wrote in message
news:11233785.1082740859200.JavaMail.itn@is.intellij.net...
>

A good idea, but difficult to do in a cross-platform way. Do I take the

intersection of all invalid file characters across all platforms, or the
union? In any case, my expectation with "Hardcoded file separator" is that
it's one of those (few) inspections that are expected to have false
positives occasionally, and that developers will just have to accept that.
A perfect code inspection platform would have some way of marking these as
"to be ignored", but you'll have to talk to JetBrains about that.
>

--Dave Griffith



0

Please sign in to leave a comment.