Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

php7-xmlreader required for WordPress Coding Standards beta container image #94

Open
Assignees
f-moya
@lucyllewy

Description

@lucyllewy

I've tried using the beta docker image ofcodeclimate-phpcodesniffer to get access to a more recentphpcs build than is in stable. (I need access to disabling specific sniffs on a single line as documented athttps://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-parts-of-a-file. The inline// phpcs:ignore form is only available in phpcs since version 3.2.0, where the stable docker image by codeclimate is still on 2.9.1.

When I run the beta docker image I am greeted with the following log showing that the container is missing thephp7-xmlreader package from the Alpine repository.

Log of execution
$ docker run   --interactive --tty --rm   --env CODECLIMATE_CODE="$PWD"   --volume "$PWD":/code   --volume /var/run/docker.sock:/var/run/docker.sock   --volume /tmp/cc:/tmp/cc   codeclimate/codeclimate analyze -e phpcodesnifferStarting analysisRunning phpcodesniffer: Done!error: (CC::CLI::Analyze::EngineFailure) engine phpcodesniffer failed with status 1 and stderrUnable to find image 'codeclimate/codeclimate-phpcodesniffer:beta' locallybeta: Pulling from codeclimate/codeclimate-phpcodesniffer5758d4e389a3: Already exists4ae1f45a9f69: Pulling fs layer0676d8c6ca5f: Pulling fs layer5dd9411e7f0f: Pulling fs layerc0105a21377e: Pulling fs layer7072198dee72: Pulling fs layer119f7d69fd65: Pulling fs layerf4466a97c155: Pulling fs layerb5fd0274c371: Pulling fs layerc0105a21377e: Waiting7072198dee72: Waiting119f7d69fd65: Waitingf4466a97c155: Waitingb5fd0274c371: Waiting0676d8c6ca5f: Download complete4ae1f45a9f69: Verifying Checksum4ae1f45a9f69: Download complete4ae1f45a9f69: Pull complete0676d8c6ca5f: Pull complete5dd9411e7f0f: Verifying Checksum5dd9411e7f0f: Download complete5dd9411e7f0f: Pull complete7072198dee72: Download completec0105a21377e: Download completec0105a21377e: Pull complete7072198dee72: Pull completef4466a97c155: Verifying Checksumf4466a97c155: Download completeb5fd0274c371: Verifying Checksumb5fd0274c371: Download complete119f7d69fd65: Verifying Checksum119f7d69fd65: Download complete119f7d69fd65: Pull completef4466a97c155: Pull completeb5fd0274c371: Pull completeDigest: sha256:670d7b4e245222e6735ccc29b7548baffd053dd9f267fbb0f0448af08d46feaeStatus: Downloaded newer image for codeclimate/codeclimate-phpcodesniffer:betaException: Class 'XMLReader' not found in /usr/src/app/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/I18nSniff.php#0 /usr/src/app/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/I18nSniff.php(464): WordPressCS\WordPress\Sniffs\WP\I18nSniff->check_text()#1 /usr/src/app/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/I18nSniff.php(390): WordPressCS\WordPress\Sniffs\WP\I18nSniff->check_argument_tokens()#2 /usr/src/app/vendor/wp-coding-standards/wpcs/WordPress/AbstractFunctionRestrictionsSniff.php(288): WordPressCS\WordPress\Sniffs\WP\I18nSniff->process_matched_token()#3 /usr/src/app/vendor/wp-coding-standards/wpcs/WordPress/AbstractFunctionRestrictionsSniff.php(200): WordPressCS\WordPress\AbstractFunctionRestrictionsSniff->check_for_matches()#4 /usr/src/app/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/I18nSniff.php(213): WordPressCS\WordPress\AbstractFunctionRestrictionsSniff->process_token()#5 /usr/src/app/vendor/wp-coding-standards/wpcs/WordPress/Sniff.php(910): WordPressCS\WordPress\Sniffs\WP\I18nSniff->process_token()#6 /usr/src/app/vendor/squizlabs/php_codesniffer/src/Files/File.php(498): WordPressCS\WordPress\Sniff->process()#7 /usr/src/app/vendor/squizlabs/php_codesniffer/src/Runner.php(631): PHP_CodeSniffer\Files\File->process()#8 /usr/src/app/Executor.php(124): PHP_CodeSniffer\Runner->processFile()#9 /usr/src/app/vendor/barracudanetworks/forkdaemon-php/fork_daemon.php(1934): Executor->run()#10 /usr/src/app/vendor/barracudanetworks/forkdaemon-php/fork_daemon.php(1846): fork_daemon->invoke_callback()#11 /usr/src/app/vendor/barracudanetworks/forkdaemon-php/fork_daemon.php(1747): fork_daemon->fork_work_unit()#12 /usr/src/app/vendor/barracudanetworks/forkdaemon-php/fork_daemon.php(1499): fork_daemon->process_work_unit()#13 /usr/src/app/Executor.php(33): fork_daemon->process_work()#14 /usr/src/app/engine.php(26): Executor->queueDirectory()#15 {main}
My `.codeclimate` file
plugins:editorconfig:enabled:truefixme:enabled:truegit-legal:enabled:truephpcodesniffer:enabled:truechannel:betaconfig:standard:phpcs.xml.distscss-lint:enabled:true
My `.phpcs.dist.xml` file
<?xml version="1.0"?><rulesetname="WordPress Coding Standards for Plugins"><description>Generally-applicable sniffs for WordPress plugins</description><!-- What to scan--><file>.</file><!-- Exclude built assets--><exclude-pattern>/build/</exclude-pattern><!-- Exclude node_modules-->    <exclude-pattern>*/node_modules/*</exclude-pattern><!-- Exclude tests--><exclude-pattern>/tests/</exclude-pattern><!-- Exclude vendor directories-->    <exclude-pattern>*/vendor/*</exclude-pattern><exclude-pattern>/wp-includes</exclude-pattern><exclude-pattern>scoper.inc.php</exclude-pattern><!-- Colors! Nice!-->    <argname="colors"/><!--- Only check PHP files-->    <argname="extensions"value="php"/><!-- Commandline options for PHPCS-->    <argvalue="s"/>    <argvalue="n"/><!-- Rules: Check PHP version compatibility--><!-- https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions--><!-- <config name="testVersion" value="7.0-"/>--><!-- https://github.com/PHPCompatibility/PHPCompatibilityWP--><!-- <rule ref="PHPCompatibilityWP"/>--><ruleref="Squiz.PHP.Eval"/><!-- Rules: WordPress Coding Standards--><!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards--><!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties--><configname="minimum_supported_wp_version"value="5.0"/><ruleref="WordPress"><excludename="WordPress.Files.FileName.InvalidClassFileName"/><excludename="WordPress.Files.FileName.NotHyphenatedLowercase"/></rule><ruleref="WordPress-Docs" /><ruleref="WordPress.NamingConventions.PrefixAllGlobals"><properties><!-- Value: replace the function, class, and variable prefixes used. Separate multiple prefixes with a comma.--><propertyname="prefixes"type="array"value="a_z_listing,the_a_z_listing,have_a_z_,get_the_a_z,get_the_az,the_a_z,the_az"/></properties></rule><ruleref="WordPress.WP.I18n"><properties><!-- Value: replace the text domain used.--><propertyname="text_domain"type="array"value="a-z-listing"/></properties></rule><ruleref="WordPress.WhiteSpace.ControlStructureSpacing"><properties><propertyname="blank_line_check"value="true"/></properties></rule><ruleref="WordPress.NamingConventions.ValidHookName"><properties><propertyname="additionalWordDelimiters"value="-"/></properties></rule></ruleset>

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp