Remove Default <file> and <basepath> values#187
Conversation
tfrommen
left a comment
There was a problem hiding this comment.
Yes, this makes sense.
I defined basepath primarily for shorter (relative) paths in reports, and I did not know it could/does cause any issues.
Now, to make this an actual ruleset, we might also want to remove the exclude patterns, as well as the specified php extension...?
@mikeselander No, those are settings which should never have been included in a Standard anyway. They should only ever be used in the rulesets of individual projects.
I agree with @tfrommen, especially about the The |
rmccue
left a comment
There was a problem hiding this comment.
I believe I added <file> originally to try and improve the usability of phpcs on the command line, making it one command instead of having to always provide a "redundant" .. Happy to change that.
I am happy to keep both testVersion and extensions in here. We don't want PHP in any files that aren't .php generally, and having a standard PHP version set across all our projects I think is OK.
Good to know, I'll address that in another PR 👍 Thanks for the feedback, all - moving this forward |
This PR fixes several issues related to the defaults set in the HM ruleset that define the basepath and main files. These provide easy defaults, but can cause issues in several cases which make our rules unusable.
<basepath>: This value was preventing Visual Studio Code PHPCS extensions from using our ruleset. See Standards not being detected by VS Code #184<file>: This value was preventing projects from creating an "inclusion" list, forcing them to instead build a "disallow" list instead which is untenable for some projects. See current ruleset prevents to exclude everything except certain folders #159I feel comfortable forcing projects to set these values as they need since PHPCS should really only be setup once on a project.
Paging @jrfnl and @ntwb - do you see any problem with removing these values I might have missed?