codelicia / xulieta Goto Github PK
View Code? Open in Web Editor NEW🌹Xulieta is a light php executable that lint documentation snippets
License: MIT License
🌹Xulieta is a light php executable that lint documentation snippets
License: MIT License
It is currently already enabled at the org level.
We just need to use it here 👯
It would be nice to be able to change output as we have it today for plugins.
Mismatching range selector @
Line 31 in 29a9825
I've run it some repos from laminas, I found out lots of similar errors.
<?= $this->json($this->data) ?>
$configFiles = current(array_filter([
$dir . '/../../../../.xulieta.xml',
$dir . '/../../../.xulieta.xml',
$dir . '/../../.xulieta.xml',
$dir . '/../.xulieta.xml',
$dir . '/.xulieta.xml',
], 'is_file'));
By doing that we don't need any external code-coverage + tests will be more accurate.
; php -dzend.assertions=1 ./vendor/bin/phpunit
PHPUnit 9.5.16 by Sebastian Bergmann and contributors.
Runtime: PHP 8.1.3
Configuration: /Users/malukenho/github.com/codelicia/xulieta/phpunit.xml.dist
............................... 31 / 31 (100%)
Time: 00:01.593, Memory: 16.00 MB
OK (31 tests, 37 assertions)
; composer update
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Lock file operations: 0 installs, 28 updates, 0 removals
- Upgrading composer/composer (2.2.7 => 2.3.2)
- Upgrading composer/pcre (1.0.1 => 3.0.0)
- Upgrading composer/semver (3.2.9 => 3.3.1)
- Upgrading composer/xdebug-handler (3.0.2 => 3.0.3)
- Upgrading doctrine/instantiator (1.4.0 => 1.4.1)
- Upgrading felixfbecker/language-server-protocol (1.5.1 => v1.5.2)
- Upgrading infection/infection (0.26.5 => 0.26.6)
- Upgrading myclabs/deep-copy (1.10.2 => 1.11.0)
- Upgrading phpdocumentor/type-resolver (1.6.0 => 1.6.1)
- Upgrading phpstan/phpdoc-parser (1.2.0 => 1.4.2)
- Upgrading phpunit/php-code-coverage (9.2.13 => 9.2.15)
- Upgrading phpunit/phpunit (9.5.16 => 9.5.19)
- Upgrading roave/security-advisories (dev-master a9377ea => dev-master 4b07ae1)
- Upgrading sebastian/type (2.3.4 => 3.0.0)
- Upgrading seld/jsonlint (1.8.3 => 1.8.9)
- Upgrading slevomat/coding-standard (7.0.18 => 7.1)
- Upgrading symfony/console (v5.4.3 => v5.4.5)
- Upgrading symfony/filesystem (v5.4.3 => v5.4.6)
- Upgrading symfony/polyfill-ctype (v1.24.0 => v1.25.0)
- Upgrading symfony/polyfill-intl-grapheme (v1.24.0 => v1.25.0)
- Upgrading symfony/polyfill-intl-normalizer (v1.24.0 => v1.25.0)
- Upgrading symfony/polyfill-mbstring (v1.24.0 => v1.25.0)
- Upgrading symfony/polyfill-php73 (v1.24.0 => v1.25.0)
- Upgrading symfony/polyfill-php80 (v1.24.0 => v1.25.0)
- Upgrading symfony/polyfill-php81 (v1.24.0 => v1.25.0)
- Upgrading symfony/process (v5.4.3 => v5.4.5)
- Upgrading twig/twig (v3.3.8 => v3.3.9)
- Upgrading vimeo/psalm (4.21.0 => 4.22.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 28 updates, 0 removals
- Downloading seld/jsonlint (1.8.9)
- Downloading composer/composer (2.3.2)
- Downloading phpstan/phpdoc-parser (1.4.2)
- Downloading twig/twig (v3.3.9)
- Downloading infection/infection (0.26.6)
- Downloading felixfbecker/language-server-protocol (v1.5.2)
0/6 [>---------------------------] 0% - Downloading seld/jsonlint (1.8.9)
- Upgrading symfony/polyfill-mbstring (v1.24.0 => v1.25.0): Extracting archive
- Upgrading symfony/polyfill-ctype (v1.24.0 => v1.25.0): Extracting archive
- Upgrading symfony/polyfill-php80 (v1.24.0 => v1.25.0): Extracting archive
- Upgrading symfony/process (v5.4.3 => v5.4.5): Extracting archive
- Upgrading symfony/polyfill-php73 (v1.24.0 => v1.25.0): Extracting archive
- Upgrading symfony/filesystem (v5.4.3 => v5.4.6): Extracting archive
- Upgrading symfony/polyfill-intl-normalizer (v1.24.0 => v1.25.0): Extracting archive
- Upgrading symfony/polyfill-intl-grapheme (v1.24.0 => v1.25.0): Extracting archive
- Upgrading symfony/console (v5.4.3 => v5.4.5): Extracting archive
- Upgrading seld/jsonlint (1.8.3 => 1.8.9): Extracting archive
- Upgrading composer/pcre (1.0.1 => 3.0.0): Extracting archive
- Upgrading composer/xdebug-handler (3.0.2 => 3.0.3): Extracting archive
- Upgrading composer/semver (3.2.9 => 3.3.1): Extracting archive
- Upgrading composer/composer (2.2.7 => 2.3.2): Extracting archive
- Upgrading phpstan/phpdoc-parser (1.2.0 => 1.4.2): Extracting archive
- Upgrading slevomat/coding-standard (7.0.18 => 7.1): Extracting archive
- Upgrading twig/twig (v3.3.8 => v3.3.9): Extracting archive
- Upgrading infection/infection (0.26.5 => 0.26.6): Extracting archive
- Upgrading phpdocumentor/type-resolver (1.6.0 => 1.6.1): Extracting archive
- Upgrading sebastian/type (2.3.4 => 3.0.0): Extracting archive
- Upgrading phpunit/php-code-coverage (9.2.13 => 9.2.15): Extracting archive
- Upgrading doctrine/instantiator (1.4.0 => 1.4.1): Extracting archive
- Upgrading myclabs/deep-copy (1.10.2 => 1.11.0): Extracting archive
- Upgrading phpunit/phpunit (9.5.16 => 9.5.19): Extracting archive
- Upgrading roave/security-advisories (dev-master a9377ea => dev-master 4b07ae1)
- Upgrading symfony/polyfill-php81 (v1.24.0 => v1.25.0): Extracting archive
- Upgrading felixfbecker/language-server-protocol (1.5.1 => v1.5.2): Extracting archive
- Upgrading vimeo/psalm (4.21.0 => 4.22.0): Extracting archive
Package webmozart/path-util is abandoned, you should avoid using it. Use symfony/filesystem instead.
Generating autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
63 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
infection/extension-installer: No extensions found
malukenho/mcbumpface is updating symfony/console package from version (^v5.4.3) to (^v5.4.5)
malukenho/mcbumpface is updating symfony/process package from version (^v5.4.3) to (^v5.4.5)
malukenho/mcbumpface is updating composer/composer dev package from version (^2.2.7) to (^2.3.2)
malukenho/mcbumpface is updating infection/infection dev package from version (^0.26.5) to (^0.26.6)
malukenho/mcbumpface is updating phpunit/phpunit dev package from version (^9.5.16) to (^9.5.19)
malukenho/mcbumpface is updating vimeo/psalm dev package from version (^4.21.0) to (^4.22.0)
; php -dzend.assertions=1 ./vendor/bin/phpunit
PHPUnit 9.5.19 #StandWithUkraine
Runtime: PHP 8.1.3
Configuration: /Users/malukenho/github.com/codelicia/xulieta/phpunit.xml.dist
.E............................. 31 / 31 (100%)
Time: 00:01.570, Memory: 16.00 MB
There was 1 error:
1) Codelicia\Xulieta\Unit\AutoPlugin\RegisterTest::itShouldFailWhenGetOperationHasNoValidResult
PHPUnit\Framework\MockObject\IncompatibleReturnValueException: Method getOperation may not return value of type stdClass, its declared return type is "Composer\DependencyResolver\Operation\OperationInterface"
/Users/malukenho/github.com/codelicia/xulieta/tests/unit/AutoPlugin/RegisterTest.php:33
ERRORS!
Tests: 31, Assertions: 35, Errors: 1.
Would be handy to have some plugin pattern to quickly implement new checks.
The xml configuration is out of date.
Show files that are being verified and the configuration file that is loaded.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
symfony/config
, symfony/console
, symfony/finder
, symfony/process
)composer.json
php ~8.1.0 || ~8.2.0 || ~8.3.0
azjezz/psl ^2.6.0
beberlei/assert ^v3.3.2
composer/composer ^2.5.7
doctrine/rst-parser ^0.5.4
nikic/php-parser ^v4.15.5
symfony/config ^v6.3.0
symfony/console ^v6.3.0
symfony/finder ^v6.3.0
symfony/process ^v6.3.0
webmozart/assert ^1.11.0
doctrine/coding-standard ^12.0.0
infection/infection ^0.27.0
maglnet/composer-require-checker ^4.6.0
malukenho/mcbumpface ^1.2.0
phpunit/phpunit ^10.2.1
staabm/annotate-pull-request-from-checkstyle ^1.8.5
vimeo/psalm ^5.12.0
.github/workflows/main.yml
actions/checkout v4
shivammathur/setup-php v2
.github/workflows/project.yml
actions/add-to-project v0.5.0
.github/workflows/release-on-milestone-closed.yml
actions/checkout v4
laminas/automatic-releases v1
laminas/automatic-releases v1
ubuntu 22.04
The tests on CI using php 8.1 were removed since some errors were found.
We have to fix those errors to support PHP 8.1.
composer install
?There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: Cannot find preset's package (github>whitesource/merge-confidence:beta)
I see some project documentations will SQL examples and would be nice if we could detect syntax errors using Xulieta.
It is polluting the diff making PR hard to read.
Using the configuration:
<?xml version="1.0" encoding="UTF-8" ?>
<xulieta xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/codelicia/xulieta/xulieta.xsd">
<validator>Codelicia\XulietaJson\JsonValidator</validator>
<validator>Codelicia\XulietaJson\JsonValidator</validator>
</xulieta>
validators will be an array and with the configuration:
<?xml version="1.0" encoding="UTF-8" ?>
<xulieta xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/codelicia/xulieta/xulieta.xsd">
<validator>Codelicia\XulietaJson\JsonValidator</validator>
</xulieta>
validators will be a string.
Fatal error: Uncaught Symfony\Component\Config\Definition\Exception\InvalidTypeException: Invalid type for path "xulieta.validator". Expected "array", but got "string" in /home/eher/git/github.com/codelicia/xulieta-json/vendor/symfony/config/Definition/ArrayNode.php:254
Stack trace:
#0 /home/eher/git/github.com/codelicia/xulieta-json/vendor/symfony/config/Definition/BaseNode.php(566): Symfony\Component\Config\Definition\ArrayNode->validateType('Codelicia\\Xulie...')
#1 /home/eher/git/github.com/codelicia/xulieta-json/vendor/symfony/config/Definition/BaseNode.php(409): Symfony\Component\Config\Definition\BaseNode->doValidateType('Codelicia\\Xulie...')
#2 /home/eher/git/github.com/codelicia/xulieta-json/vendor/symfony/config/Definition/ArrayNode.php(285): Symfony\Component\Config\Definition\BaseNode->normalize('Codelicia\\Xulie...')
#3 /home/eher/git/github.com/codelicia/xulieta-json/vendor/symfony/config/Definition/BaseNode.php(412): Symfony\Component\Config\Definition\ArrayNode->normalizeValue(Array)
#4 /home/eher/git/git in /home/eher/git/github.com/codelicia/xulieta-json/vendor/symfony/config/Definition/ArrayNode.php on line 254
Markinho
is not able to extract a code sample if the markdown immediately starts with a code sample.
One can reproduce the issue by parsing:
$code = '{;;;;;;}'; // yes, it is a valid PHP syntax
eval('<?php ' . $code); // this line is buggy due to "<?php "
Currently, it is just passing the whole code block to the stdout, which is not interesting given that we can have large code samples.
In order to do that, we need to be able to get the exactly line number where the error occurred. It may be necessary to add that information once we extract data with Markinho
I'm working on s xulieta plugin installer
in another repository https://github.com/codelicia/xulieta-plugin-installer
Document in this project, but create it in another repository.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.