Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 512662

Summary: Hiding left ruler hides problem annotations with offset 0
Product: [ECD] Orion Reporter: Curtis Windatt <curtis.windatt.public>
Component: EditorAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED WORKSFORME QA Contact:
Severity: minor    
Priority: P2 CC: Silenio_Quarti, steve_northover
Version: 13.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Screenshot none

Description Curtis Windatt CLA 2017-02-23 15:21:15 EST
Created attachment 266971 [details]
Screenshot

If you have a problem annotation with offset start: 0 end: 0 (or any annotation with 0 length) and you have the left side ruler hidden, the only indication that you have a problem is the small rectangle in the right ruler.

.quickfix {
	a: 1 !important;
	a: 1 !important;
	a: 1 !important;
	a: 1 !important;
	a: 1 !important;
	a: 1 !important;
	a: 1 !important;
	a: 1 !important;
	a: 1 !important;
	a: 1 !important;
}

In CSS, if you have too many !important attributes CSSLint will warn you at the top of the file that you have too many.  See how hard it is to notice it in the screenshot. Note that we had many similar problems in JS until Bug 511604.  I have opened a similar bug to improve CSS, see Bug 512586.
Comment 1 Steve Northover CLA 2017-03-29 13:03:01 EDT
So there are warnings that are only available at the top of the file?  Do we know how many of these there are?
Comment 2 Curtis Windatt CLA 2017-03-29 13:28:36 EDT
(In reply to Steve Northover from comment #1)
> So there are warnings that are only available at the top of the file?  Do we
> know how many of these there are?

In CSS there are up to 4 that are looking at the whole file and warning about it (too many important, too many font face, approaching selector limit, exceeding selector limit).  All of the rules are off by default now.

In JS we mostly do project setup for you now, but any warnings about setting up a Tern project file don't have a specific node, so they are placed at the top.

Worth noting that the offset should never be 0 if there is whitespace/comments at the top of the file.  I fixed JS and CSS to select the first token/identifier.  That change has the side effect of reducing this bug's severity as the squiggle underlines are more visible.
Comment 3 Steve Northover CLA 2017-03-29 15:26:23 EDT
> In JS we mostly do project setup for you now,
> but any warnings about setting up a Tern project
> file don't have a specific node, so they are placed at the top.

So what would we do about these?  First off, find out how many we have.  Perhaps we just leave them.  There is no underline for them but they appear in the stripe down the right hand side ... or they are nowhere?
Comment 4 Curtis Windatt CLA 2017-03-29 15:41:13 EDT
(In reply to Steve Northover from comment #3)
> > In JS we mostly do project setup for you now,
> > but any warnings about setting up a Tern project
> > file don't have a specific node, so they are placed at the top.
> 
> So what would we do about these?  First off, find out how many we have. 
> Perhaps we just leave them.  There is no underline for them but they appear
> in the stripe down the right hand side ... or they are nowhere?

Just checked and there are definitely still rules that check various Tern plugins are running.

However, because I fixed the code to select the first token rather than use offset 0,0, there is an underline. As I mentioned in my previous comment this bug is less severe because of that change.

The right hand ruler always shows the warning with a little strip.
Comment 5 Steve Northover CLA 2017-03-29 15:43:04 EDT
Close then?  There is always a way to get to a problem?
Comment 6 Curtis Windatt CLA 2017-03-29 15:54:35 EDT
(In reply to Steve Northover from comment #5)
> Close then?  There is always a way to get to a problem?

Closing.

When we were discussing the merits of hiding the left hand ruler I mentioned this as an annoying side effect (a warning on the right hand ruler is much harder to notice).  You asked me to open this bug for it :)
Comment 7 Steve Northover CLA 2017-03-29 15:59:53 EDT
Sorry I am reading the title (which is unclear) and after the bottom line: The guy can get his error.