-
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
Can we get the tests/ directory in the zip download #548
Comments
I added this to the export-ignore list because people specifically requested that I exclude the tests. I can't satisfy both requests. Is there any way you can use a clone, or tell composer to use a clone during development? |
I can specify the
|
You could maintain two installations of PHPCS.
As long In next step you symlinking your custom standard into the clone of PHPCS. |
@Konafets You may be misunderstanding my requirements. Right now, I have php_codesniffer and phpunit as dependencies in the repository for this standard. Upon installation, I run:
This way, I can run phpunit --filter=MyStandard_* vendor/squizlabs/php_codesniffer/tests/AllTests.php I'm really only concerning myself with development of this standard as this use-case. Using the standard in production isn't a problem, as I don't have to worry about the /tests directory for testing. |
I came to ask for the same thing. I'm working on the CodeSniffer package for Gentoo, and when our users install a package, they have the ability to run the test suite before proceeding with the installation (in case something is screwed up). The tests work really well out of the box (thank you!) but they aren't present in the tarball that we fetch. I can make our package fetch from git, but we try to avoid it. Cloning from git prevents us from using our mirror infrastructure, and prevents us from signing a package manifest containing the SHA-whatever hash of the tarball for verification. It also wastes a ton of time/space on the users machines since they get the whole project history instead of just the release that they want. So, if this decision was arrived at democratically, please count my vote for shipping the tests =) |
I committed this with the test suite disabled (RESTRICT=test): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=478531c6053a110779bd4bbc8adcd165c047a339 But it would Just Work if the tests directory were there. If it ever comes back I can remove that line and you'll get a lot more people automatically exercising your test suite. |
I've added the tests dir back into the 3.x version only. The PHAR files are already bigger there as well, and the .gitattributes wasn't even working properly due to file paths being changed. If nobody complains about the tests being in there again, then I guess I'lll leave it in. If someone eventually finds a good reason to remove them again, I'll consider removing them. |
@gsherwood would it be possible to put the tests in a separate repo and have them as a dev requirement? Best of both worlds so only those who need them can require them in their own custom sniff repos. |
Im sure it is possible, but then I wouldn't be able to run them from a clone unless I use a submodule. I'd also have to change the way tests are discovered and run so they don't live inside the standard's directory, which isn't something I want to do. |
This is needed if you want to extend the buildserver and reuse tests
…iation_remove_keyword_context_test Squiz/ObjectInstantiation: remove keyword context test
When downloading the zip from github (as Composer will do by default), the tests/ directory is absent. I assume this has to do with the build prepared for download. Unfortunately, when using php_codesniffer as a dependency in composer.json (such as when writing an internal standard with new sniffs), the tests/ directory is very valuable, if only for the
AllTests.php
andTestSuites.php
The text was updated successfully, but these errors were encountered: