-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve discoverability of configurable sniffs / public member vars #1278
Comments
I've wanted to do this for a while, ideally using a script, but I was also planning that the Doc Generator stuff could be used as well. Manually putting it all together and making it useful with examples would be a big task, but it would be a great resource and I'd certainly add it to the wiki. But I think it's something that really requires a full doc of every included sniff, what they do, how to include them in a ruleset, how the configuration options change that behaviour, and examples of how to set those options in a ruleset. It's a big job. |
I'm fully aware of this, but am willing to put in the time. I might not be able to get everything done in one go, but will keep you informed of progress. What about if I put work in progress in a gist for feedback (and easy copy/paste to the wiki) ? I've just finished preparing the same for the WP coding standards (not yet online as I've been cleaning things up which I came across while doing it, waiting for the merges before publishing). |
Update: That was surprisingly less painful than expected. I've finish creating the list, will tidy up later today or tomorrow and put a draft online. |
Ok, tidying up took a bit more time, but you can find the page I've prepared for the wiki here: It's completely up to date up to the latest commit 8120537 and already includes the proposed new properties as per PR #1318 Feedback welcome. |
Oh wow! You're amazing. I got inundated with PHPCS issues over the last few days so I haven't looked at this properly yet, but I promise I'll get this committed as soon as I can. Thanks so much. |
I've added the wiki page here: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Customisable-Sniff-Properties I still need to go through it properly, but I think it would be easier to manage for me, and link to, if each sniff was broken out rather than grouping properties together when they have the same name. So I might make that specific change, and rework the tables from that so they fit within Github's incredibly narrow window. Thanks again. |
Hi @gsherwood Thanks for that. If there's anything I can do to help, let me know. Hope people will find this addition to the wiki useful. P.S.: please note that the document already contains the properties from PR #1318 which hasn't been merged (yet). |
Currently to find out if a sniff has any configuration options, one has to look at the sniff files themselves.
In my experience, this results in a lot of people not knowing about the fact that some sniffs can be configured, let alone, using these features.
And for people who have PHPCS installed as a phar file, looking at the source code is not even an option (unless they look at it here).
I believe a wiki page could help improve the discoverability.
Would you interested in adding a wiki page with a list of the current properties per standard ?
I'd be willing to put in the work to try and gather the information for the page.
Related to #1140
The text was updated successfully, but these errors were encountered: