Removing empty lines in a class can remove all errors from that file
See original GitHub issueVersion Used: 17.4.0 Preview 6.0 (and I’m pretty sure that this wasn’t an issue in Preview 2.1)
Steps to Reproduce:
I have a small example C# file in my normal project. This file has errors (unimplemented interface and missing async
):
internal class Test : IEnumerable<int>
{
public Task Method()
{
await Task.Delay(1000);
}
}
I add a couple of empty lines in that file above the Method
and then remove them randomly using Shift+Del.
Expected Behavior: Nothing weird should happen.
Actual Behavior: Each time I remove lines, one of three things that can happen in addition to the lines being gone:
- Nothing else (most of the time)
- Briefly, all red squiggles are gone and then come back (a couple of times)
- All red squiggles vanish and don’t come back until the next edit (rarely)
The gif starts with 2. then shows a couple of 1. and ends with a 3.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
How to remove empty lines from a text file? Java
I assume you're just testing with that method so far since it would always return an empty string. Besides that, what's the problem...
Read more >How to remove empty/blank lines from a file in Unix ...
This sed line should do the trick: sed -i '/^$/d' file.txt. The -i means it will edit the file in-place.
Read more >How Can I Remove All the Blank Lines from a Text File?
If it is, we discard it; if it's not, we add that line (along with any other non-blank lines) to a variable named...
Read more >How to Get Rid of Empty Lines of Code in Any Text Editor
Step-by-Step: How to Remove Blank Lines of Code Using a Text Editor · In the file you want to clean up, select two...
Read more >How to remove empty lines at the end of a file using awk?
So if/when you find yourself referring to any data as "empty" in future be sure to state what you mean by that. Most...
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
@Youssef1313 https://github.com/dotnet/roslyn/pull/64885 shouldn’t be causing this. I am seeing similar slowness in diagnostic computation in latest intpreview builds. Seems like an unrelated regression. I’ll investigate
I would say that the IDE feels a whole lot smoother in 17.5.0 Preview 4 and I haven’t seen anything like in the OP