codelicia / xulieta
Xulieta is a light php binary that lint documentation snippets
Installs: 6 546
Dependents: 4
Suggesters: 0
Security: 0
Stars: 67
Watchers: 5
Forks: 5
Open Issues: 9
Type:composer-plugin
Requires
- php: ~7.4 || ~8.0
- composer-plugin-api: ^2.2
- ext-dom: *
- beberlei/assert: ^v3.3.2
- doctrine/rst-parser: ^0.1.0 || ^0.3.0
- nikic/php-parser: ^v4.13.2
- symfony/config: ^v5.4.3
- symfony/console: ^v5.4.3
- symfony/finder: ^v5.4.3
- symfony/process: ^v5.4.3
- webmozart/assert: ^1.10.0
Requires (Dev)
- composer/composer: ^2.2.7
- doctrine/coding-standard: ^8.2.0 || ^9.0.0
- infection/infection: ^0.26.5
- malukenho/mcbumpface: ^1.1.5
- phpunit/phpunit: ^9.5.16
- roave/security-advisories: dev-master
- staabm/annotate-pull-request-from-checkstyle: ^1.8.2
- vimeo/psalm: ^4.21.0
Suggests
- codelicia/xulieta-json: To have the JSON validator
- codelicia/xulieta-php-lp: To have the PHP Litterate Programming validator
- 2.0.x-dev
- 1.0.x-dev
- 1.0.0
- 0.2.x-dev
- 0.2.0
- 0.1.x-dev
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- dev-renovate/php-8.x
- dev-renovate/ubuntu-24.x
- dev-renovate/azjezz-psl-3.x
- dev-renovate/actions-add-to-project-1.x
- dev-renovate/infection-infection-0.x
- dev-renovate/major-symfony
- dev-renovate/nikic-php-parser-5.x
- dev-renovate/phpunit-phpunit-11.x
- dev-enable-project-automation
- dev-infection
- dev-sql
This package is auto-updated.
Last update: 2024-11-22 19:59:44 UTC
README
🌹 XULIETA
Xulieta is a light php binary that lint documentation snippets.
Xulieta is a light php binary that find code snippets thought out
documentation files — as for example *.md
, *.markdown
and *.rst
— and lint the pieces of code, so you can find basic documentation errors.
NOTE: For now we just lint PHP code.
Installation
composer require codelicia/xulieta
Checking for errors
In order to lint the basics of documentation structure, one just needs to provide a path for a directory or file to be linted.
./vendor/bin/xulieta check:error <directory>
Integration with GitHub Actions
We provide out of the box an output
format that you can use to have
automatic feedback from GitHub CI. That is done by specifying the
checkstyle
output and passing it to some external binary that does the
commenting.
We recommend the usage of cs2pr.
./vendor/bin/xulieta check:error <directory> --output=checkstyle | cs2pr
Commenting example
Advanced Configuration
Xulieta tries to find a .xulieta.xml
file in the root of your project
with the following configuration format:
<?xml version="1.0" encoding="UTF-8" ?> <xulieta xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="./vendor/codelicia/xulieta/xulieta.xsd"> <parser>Codelicia\Xulieta\Parser\MarkdownParser</parser> <parser>Codelicia\Xulieta\Parser\RstParser</parser> <validator>Codelicia\Xulieta\Validator\PhpValidator</validator> <outputFormatters>Codelicia\Xulieta\Output\Checkstyle</outputFormatters> <exclude>vendor</exclude> <exclude>node_modules</exclude> </xulieta>
parser
: listing of all parses to handle file formats based in the extention namevalidator
: performs verification on a given code blockoutputFormatters
: personalized output formatterexclude
: excluded directory or files
Command name
For historic reasons and the sake of the Brazilian MEME we keep the original command xulieta check:erromeu
.
Plugins
Xulieta
will automatically scan dependencies to see if there is
any package that is providing default configurations.
If you want your plugin to take advantage of that functionality,
we expect you to provide some information on your composer.json
file, ie:
{ "extra": { "xulieta": { "parser": ["Malukenho\\QuoPrimumTempore\\JsonParser"], "validator": ["Malukenho\\QuoPrimumTempore\\JsonValidator"] } } }
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!