CSSLint / csslint

Automated linting of Cascading Stylesheets
http://csslint.net
Other
4.77k stars 483 forks source link

Allow grouping by error type (feature request) #65

Open MikeHopley opened 13 years ago

MikeHopley commented 13 years ago

It would be great to have a way of grouping errors/warnings together by type. I have in mind an expandable list interface.

This would let me get a high-level overview of what kinds of mistakes I'm making, rather than overwhelm me with hundreds of mistakes that are essentially the same.

stefsullrew commented 13 years ago

You may be asking for more than this, but you can currently sort the output using the headers. So I found that sorting by title puts like errors and warnings next to each other. It's then pretty easy to scan down the list to the important ones. :)

nzakas commented 13 years ago

Was going to say the same as Stef. Is the sortable table good enough, or are you looking for something more?

MikeHopley commented 13 years ago

I was looking for something that reduced the amount of stuff to look at, rather than just ordering it by type.

Don't get me wrong -- the tool is fine as is. It would just be a handy feature.

nzakas commented 13 years ago

Are you aware that you can type in the textbox above the table and it will filter the results?

MikeHopley commented 13 years ago

I wasn't aware of that.

That search box satisfies one query: "Show me only the errors of this type."

It doesn't satisfy another query: "Show me which types of errors I am making."

nzakas commented 13 years ago

I'm sorry, I'm having a hard time understanding the distinction. You can sort by rule type, then type the specific rule name in the searchbox and see just those. I guess I'm just not understanding your case, can you give a specific example of something you're having trouble doing right now?

MikeHopley commented 13 years ago

I would like to see a shortlist of the types of errors I'm making. For example:

-- Adjoining classes (23 instances: show all) -- Box model (15 instances: show all) -- Display property grouping (5 instances: show all) -- Empty rules (3 instances: show all) -- IDs (457 instances: show all) -- Overqualified elements (607 instances, show all) -- Qualified headings (40 instances: show all) -- Unique headings (35 instances: show all) -- !Important (60 instances: show all) -- Width 100% (7 instances: show all) -- [Rollup] Floats: too many floats (43), abstraction needed -- [Rollup] Font sizes: too many font size declarations (43), abstraction needed -- [Rollup] !important: too many uses of !important

That's a list of 13 items, which is much easier to digest than a list of 1255 items. I can see at a glance the kinds of mistakes I'm making, rather than wearing out my mouse scroll wheel to find the next category.

Don't get me wrong: I can still use the tool just fine, and it's still great. But the interface could be better. This is about making types of errors more immediately discoverable.

nzakas commented 13 years ago

Thanks for the example, that's very helpful. We'll see what we can do along these lines.

MikeHopley commented 13 years ago

Great! Glad to help. :)

stubbornella commented 13 years ago

Good point, I like this idea. It does require a pretty major UI overhaul.

MikeHopley commented 13 years ago

Yes, it would require significant UI changes. It probably makes sense to put this idea on the back burner.

Given that CSS Lint is developing and gaining new features, you might want to avoid redesigning UI at the moment (in case you just have to redesign it again when another new feature comes out).