Package Details: php-codesniffer 3.7.1-1

Git Clone URL: https://aur.archlinux.org/php-codesniffer.git (read-only, click to copy)
Package Base: php-codesniffer
Description: PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files to detect and fix violations of a defined set of coding standards.
Upstream URL: http://pear.php.net/package/PHP_CodeSniffer/
Licenses: BSD
Submitter: None
Maintainer: sender
Last Packager: sender
Votes: 65
Popularity: 0.133325
First Submitted: 2010-06-13 09:00 (UTC)
Last Updated: 2022-06-21 10:00 (UTC)

Pinned Comments

sender commented on 2018-11-01 13:47 (UTC)

Installation note: the message "One or more PGP signatures could not be verified!" means that you need to import Greg Sherwood's key by running gpg --recv-keys 31C7E470E2138192. More info on keys: https://wiki.archlinux.org/index.php/GnuPG#Import_a_public_key

Latest Comments

long_blade commented on 2020-11-10 16:14 (UTC) (edited on 2020-11-10 16:18 (UTC) by long_blade)

If you encounter the following error use a different key server!

gpg: keyserver receive failed: General error

Try the following:

gpg --keyserver keys.gnupg.net --recv-keys 31C7E470E2138192

sender commented on 2020-04-12 11:54 (UTC)

@ohobbs72: I never heard this complaint before. I have to say that I don't use this package myself anymore, but looking at https://github.com/squizlabs/PHP_CodeSniffer/blob/dabf3019abc9aff3d9c864167c19cee226da880a/src/Config.php#L1551 I don't see anything that can be changed during packaging to get rid of the error. Suggestions are welcome.

ohobbs72 commented on 2020-04-12 02:13 (UTC)

"ERROR: Config file /usr/bin/CodeSniffer.conf could not be written" - Why does it write the config there and not in the home directory?

sender commented on 2018-11-09 23:28 (UTC)

@OneEyedSpaceFish, pkgrel didn't match. yay let this slip, pacaur apparently not. Anyway, should be fixed now!

OneEyedSpaceFish commented on 2018-11-09 17:16 (UTC) (edited on 2018-11-09 17:16 (UTC) by OneEyedSpaceFish)

@sender

Hi! It seems that ever since the latest build 3.3.2-2 Pacaur fails to update the package with the following error message:

:: php-codesniffer package(s) failed to install.

:: ensure package version does not mismatch between .SRCINFO and PKGBUILD

:: ensure package name has a VCS suffix if this is a devel package

Do you have any idea why would this be?

Thanks; SpaceFish

sender commented on 2018-11-01 13:47 (UTC)

Installation note: the message "One or more PGP signatures could not be verified!" means that you need to import Greg Sherwood's key by running gpg --recv-keys 31C7E470E2138192. More info on keys: https://wiki.archlinux.org/index.php/GnuPG#Import_a_public_key

sender commented on 2018-11-01 13:42 (UTC)

@hoerbert Apologies. Changed something in the procedure and this was left out. Pushed a fix.

hoerbert commented on 2018-11-01 12:59 (UTC) (edited on 2018-11-01 13:02 (UTC) by hoerbert)

Hey sender, is it possible you forgot to update the checksums of the downloaded files?

==> Validating source files with sha256sums... phpcs-3.3.2.phar ... FAILED phpcs-3.3.2.phar.asc ... Skipped phpcbf-3.3.2.phar ... FAILED phpcbf-3.3.2.phar.asc ... Skipped licence-3.3.2.txt ... Passed ==> ERROR: One or more files did not pass the validity check!

// Edit: Well… I don't seem to be able to format that correctly… Sorry for that.

lpanhirsch commented on 2018-10-30 13:21 (UTC)

gpg --recv-keys 31C7E470E2138192

leosanvieira commented on 2018-02-07 13:38 (UTC)

@sender, shouldn't(couldn't) this info about importing the key be in a pinned comment?

sender commented on 2018-02-07 12:38 (UTC)

@leosanvieira Did you take a look at: https://wiki.archlinux.org/index.php/GnuPG#Import_a_public_key

leosanvieira commented on 2018-02-07 12:26 (UTC) (edited on 2018-02-07 12:35 (UTC) by leosanvieira)

Not working, failing at pgp verification.

==> Validating source files with sha256sums... phpcs-3.2.2.phar ... Passed phpcs-3.2.2.phar.asc ... Skipped phpcbf-3.2.2.phar ... Passed phpcbf-3.2.2.phar.asc ... Skipped licence-3.2.2.txt ... Passed ==> Verifying source file signatures with gpg... phpcs-3.2.2.phar ... FAILED (unknown public key 31C7E470E2138192) phpcbf-3.2.2.phar ... FAILED (unknown public key 31C7E470E2138192) ==> ERROR: One or more PGP signatures could not be verified!

vendion commented on 2017-02-14 14:17 (UTC) (edited on 2017-02-14 14:36 (UTC) by vendion)

Not sure if the checksums are out of date or if broken again ==> Making package: php-codesniffer 2.8.0-1 (Tue Feb 14 09:15:34 EST 2017) ==> Retrieving sources... -> Found phpcs.phar -> Found phpcbf.phar -> Found licence.txt ==> Validating source files with sha256sums... phpcs.phar ... FAILED phpcbf.phar ... FAILED licence.txt ... Passed ==> ERROR: One or more files did not pass the validity check! Edit: I removed pacaur's cache directory for php-codesniffer and tried again and it worked so please ignore.

rednas commented on 2016-10-21 07:04 (UTC)

@sender, thanks for looking about the problem. Today it worked. Maybe some broken build in my cache. Although I deleted it meanwhile.

sender commented on 2016-10-20 16:19 (UTC)

@rednas This time I can't replicate. When I download the phar's from github and run sha256sum on them, they all match.

rednas commented on 2016-10-19 06:02 (UTC)

Hi, since last update the validity check error is back: ==> Validating source files with sha256sums... phpcs.phar ... FAILED phpcbf.phar ... FAILED licence.txt ... Passed ==> ERROR: One or more files did not pass the validity check!

sender commented on 2016-06-01 10:14 (UTC)

@sanduhrs Fixed checksums. Got bitten by old-version/same-name *.phar in build dir.

sanduhrs commented on 2016-05-31 17:13 (UTC)

==> Validating source files with sha256sums... phpcs.phar ... FAILED phpcbf.phar ... FAILED licence.txt ... Passed ==> ERROR: One or more files did not pass the validity check! ==> ERROR: Makepkg was unable to build php-codesniffer.

sender commented on 2016-04-17 12:02 (UTC)

@KingCrunch I've switched this package to use PHAR instead of using PEAR. Thanks for the pointer. Please test.

sender commented on 2016-04-16 17:03 (UTC) (edited on 2016-04-16 17:04 (UTC) by sender)

@KingCrunch I haven't used this personally for a while. Do you refer to/what do you think of the: 'php pyrus.phar install pear/PHP_CodeSniffer' method that's suggested on http://pear.php.net/package/PHP_CodeSniffer?

KingCrunch commented on 2016-04-14 22:08 (UTC)

Hi. I've seen the same issue and yes, adjusting the include_path should solve my problem. Is there's a reason you don't use the PHAR distribution? It contains all required dependencies, thus there is no need to change system settings to get things working.

broiniac commented on 2016-01-14 16:12 (UTC)

No, but thanks for update. My error can be fixed by setting: include_path = ".:/usr/share/pear" in php.ini. Thanks for your reply :)

sender commented on 2016-01-13 17:05 (UTC)

Updated to latest stable v2.5.0 @Alphanumerix: does this fix your problem?

broiniac commented on 2016-01-13 15:59 (UTC) (edited on 2016-01-13 16:23 (UTC) by broiniac)

With newest php available in repo (7.0.2) I've error posted below: PHP Warning: include_once(PHP/CodeSniffer/CLI.php): failed to open stream: No such file or directory in /usr/bin/phpcs on line 21 PHP Warning: include_once(): Failed opening 'PHP/CodeSniffer/CLI.php' for inclusion (include_path='.:') in /usr/bin/phpcs on line 21 PHP Fatal error: Uncaught Error: Class 'PHP_CodeSniffer_CLI' not found in /usr/bin/phpcs:24 Stack trace: #0 {main} thrown in /usr/bin/phpcs on line 24 I believe it's related to this error from 2016-01-04 04:55 posted here: https://aur.archlinux.org/packages/php-cs-fixer/?comments=all Error in post above is fixed now (or at least it's not occurring on my box).

sender commented on 2015-12-10 16:23 (UTC)

@biinari weird, should be fixed now

biinari commented on 2015-12-10 15:30 (UTC)

Looks like the sha256sum is incorrect (perhaps upstream re-submitted to PEAR)

biinari commented on 2015-12-10 15:25 (UTC)

@vohof You can put your additional coding standards whereever you like and configure PHP Codesniffer to find them using phpcs --config-set installed_paths /path/to/wpcs (replace /path/to/wpcs with the path where you put your extra coding standards) as per instructions in https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards#standalone

vohof commented on 2015-05-09 05:25 (UTC)

Hi, where do I install additional coding standards? e.g. https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards

sender commented on 2015-04-09 10:16 (UTC)

@ram4nd Can you clarify? Is it a problem with the php-codesniffer or with the custom coding style rule set that you use? After some experimenting I believe it to be the latter. Suggestions are welcome.

ram4nd commented on 2015-04-09 07:36 (UTC)

Does not work with PhpStorm!

bugbuster commented on 2015-04-05 14:24 (UTC)

I found the reason: My user account has a .pearrc which defines custom directories. This .pearrc is picked up by the build and everything is screwed up. I did not get -u working to skip user configuration. So I ended up using HOME=/tmp pear install -P ${pkgdir} ${srcdir}/${_pkgname}-${pkgver}.tgz which worked ;-)

sender commented on 2015-04-04 21:33 (UTC)

@bugbuster I can't reproduce this error. Other packages installing through PEAR apply similar techniques to remove PEAR metadata from $pkgdir. Suggestions are welcome.

bugbuster commented on 2015-04-04 10:20 (UTC)

The PKGBUILD does not work as expected: LANG=en_US.UTF-8 makepkg ==> Making package: php-codesniffer 2.3.0-1 (Sat Apr 4 12:18:07 CEST 2015) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Retrieving sources... -> Found PHP_CodeSniffer-2.3.0.tgz ==> Validating source files with md5sums... PHP_CodeSniffer-2.3.0.tgz ... Passed ==> Extracting sources... ==> Removing existing $pkgdir/ directory... ==> Entering fakeroot environment... ==> Starting package()... install ok: channel://pear.php.net/PHP_CodeSniffer-2.3.0 /tmp/php-codesniffer/PKGBUILD: line 24: cd: /tmp/php-codesniffer/pkg/php-codesniffer/usr/share/pear: No such file or directory ==> ERROR: A failure occurred in package(). Aborting...

Durag commented on 2015-04-02 22:08 (UTC)

2.3.0 is out. md5sum is 7572350670346fe9183259d7c0c91656 If you also get a PHP Warning about open_basedir restrictions, I found an easy tutorial how to fix this: https://jfabianpe.wordpress.com/2012/07/03/codesniffer-en-arch-linux/ It's in spanish but easy to understand.

pfrenssen commented on 2015-01-13 08:09 (UTC)

2.1.0 is out.

Cthulhu82 commented on 2014-12-12 14:58 (UTC)

2.0.0 was released on 2014-12-05

dago_ar commented on 2014-10-19 01:00 (UTC)

1.5.5 (stable) was released on 2014-09-26

sender commented on 2013-03-10 11:00 (UTC)

@skremiec Your lines have been added, tested and seem to work fine. Thanks for the addition.

skremiec commented on 2013-03-09 11:31 (UTC)

Please consider appending the following lines to the build function in order to remove PEAR channel metadata etc. from the package (which may cause filesystem conflicts): cd ${pkgdir}/usr/share/pear rm -r $(ls -A | grep '^\.')

pfrenssen commented on 2013-02-22 16:56 (UTC)

1.4.4 was released on 2013-02-06.

sender commented on 2012-02-28 19:17 (UTC)

Adopted and updated to 1.3.3 (stable) released on 2012-02-17

bgaleotti commented on 2011-10-26 00:44 (UTC)

1.3.0 was released on 2011-03-17