Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Include ability to make assertions #39

Open
rupl opened this issue Apr 30, 2015 · 1 comment
Open

Include ability to make assertions #39

rupl opened this issue Apr 30, 2015 · 1 comment

Comments

@rupl
Copy link

rupl commented Apr 30, 2015

When using other analysis tools I often take advantage of assertions. For example using phantomas one can assert that the analysis "failed" when there are more than X number of HTTP requests total, or the CSS exceeds a certain number of bytes, etc.

Using assertions within Parker could be a nice way to control the growth of a CSS codebase. I'm looking at stats like "Total Important Keywords" or "Total ID selectors" — things like that.

Possible cons: it might get misused and people might be lured into a false sense of security (or even write code in weird ways to avoid making a certain stat rise).

Would this feature be worthwhile to anyone else? Are there other cons I'm overlooking?

@bartveneman
Copy link

Wouldn't it be better to use tools like StyleLint for that? Personally I use Parker for dashboards to we can monitor growth, complexity and branding related issues. From that we decide what adjustments we want to make to make the results more to our liking, but they are hardly ever urgent. For us it means that an occasional !important is allowed, but only if it has already passed code review. Linters are the tools we use to prevent an overflow of unwanted ID's, importants entering the codebase so that we don't have to take too much action after it's in our codebase.

Conclusion (very opinionated): use both tools to their best quality.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants