oskarstark / doctor-rst
1.62.3
2024-08-28 12:09 UTC
Requires
- php: ^8.3
- ext-ctype: *
- ext-iconv: *
- ext-mbstring: *
- composer/semver: ^3.4.2
- ondram/ci-detector: ^4.2.0
- symfony/config: ^7.1.1
- symfony/console: ^7.1.3
- symfony/dependency-injection: ^7.1.3
- symfony/finder: ^7.1.3
- symfony/options-resolver: ^7.1.1
- symfony/service-contracts: ^3.5.0
- symfony/string: ^7.1.3
- symfony/yaml: ^7.1.1
- webmozart/assert: ^1.11
Requires (Dev)
- ergebnis/composer-normalize: ^2.43.0
- ergebnis/php-cs-fixer-config: ^6.34
- ergebnis/test-util: ^1.6
- icanhazstring/composer-unused: ^0.8.11
- mikey179/vfsstream: ^1.6.11
- phpstan/extension-installer: ^1.4.1
- phpstan/phpstan: ^1.11.10
- phpstan/phpstan-phpunit: ^1.4.0
- phpstan/phpstan-webmozart-assert: ^1.2.9
- phpunit/phpunit: ^10.5.27
- rector/rector: ^1.2.2
- symfony/var-dumper: ^7.1.3
Replaces
- paragonie/random_compat: ^2.0
- symfony/polyfill-ctype: *
- symfony/polyfill-iconv: *
- symfony/polyfill-php56: *
- symfony/polyfill-php70: *
- symfony/polyfill-php71: *
- symfony/polyfill-php72: *
- symfony/polyfill-php73: *
- symfony/polyfill-php74: *
- symfony/polyfill-php80: *
- symfony/polyfill-php81: *
- symfony/polyfill-php82: *
- symfony/polyfill-php83: *
- dev-develop
- 1.62.3
- 1.62.2
- 1.62.1
- 1.62.0
- 1.61.1
- 1.61.0
- 1.60.1
- 1.60.0
- 1.59.1
- 1.59.0
- 1.58.0
- 1.57.1
- 1.57.0
- 1.56.0
- 1.55.0
- 1.54.0
- 1.53.0
- 1.52.0
- 1.51.0
- 1.50.2
- 1.50.1
- 1.50.0
- 1.49.0
- 1.48.4
- 1.48.3
- 1.48.2
- 1.48.1
- 1.48.0
- 1.47.2
- 1.47.1
- 1.47.0
- 1.46.1
- 1.46.0
- 1.45.0
- 1.44.1
- 1.44.0
- 1.43.0
- 1.42.1
- 1.42.0
- 1.41.5
- 1.41.4
- 1.41.3
- 1.41.2
- 1.41.1
- 1.41.0
- 1.40.2
- 1.40.1
- 1.40.0
- 1.39.0
- 1.38.2
- 1.38.1
- 1.38.0
- 1.37.0
- 1.36.1
- 1.36.0
- 1.35.1
- 1.35.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.2
- 1.30.1
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.2
- 1.21.1
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.1
- 1.15.0
- 1.14.1
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.10.2
- 1.10.1
- 1.10.0
- 1.9.0
- 1.8.1
- 1.8.0
- 1.7.0
- 1.6.1
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.1
- 1.2.0
- 1.1.0
- 1.0.0
- 1.0.0-beta
- 0.5.0
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.5
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.0
- dev-dependabot/composer/symfony/string-7.1.5
- dev-dependabot/composer/symfony/dependency-injection-7.1.5
- dev-dependabot/composer/symfony/var-dumper-7.1.5
- dev-dependabot/composer/symfony/yaml-7.1.5
- dev-dependabot/composer/symfony/console-7.1.5
- dev-master
This package is auto-updated.
Last update: 2024-09-23 10:47:12 UTC
README
使用给定的规则检查您的文档。
可用规则
您可以在这里找到可用规则。
用法
您可以使用它作为 Github Action,如下所示
# .github/workflows/lint.yaml name: Lint on: push: pull_request: jobs: doctor-rst: name: DOCtor-RST runs-on: ubuntu-latest steps: - name: "Checkout code" uses: actions/checkout@v4 - name: DOCtor-RST uses: docker://oskarstark/doctor-rst with: args: --short --error-format=github
如果您的 *.rst
文件不在根目录中
uses: docker://oskarstark/doctor-rst with: args: --short --error-format=github + env: + DOCS_DIR: 'docs/'
错误格式化器
-
detect (默认) 如果在 GithubActions CI 环境中运行,则使用
github
,否则使用console
。 -
github 用于注释您的 pull 请求。
-
console 用于生成可读性高的输出。
要强制使用特定的格式化器,请使用 --error-format
选项。
使用缓存加速您的 GithubActions 构建
steps: - name: "Checkout" uses: actions/checkout@v4 + - name: "Create cache dir" + run: mkdir .cache + + - name: "Extract base branch name" + run: echo "##[set-output name=branch;]$(echo ${GITHUB_BASE_REF:=${GITHUB_REF##*/}})" + id: extract_base_branch + + - name: "Cache DOCtor-RST" + uses: actions/cache@v2 + with: + path: .cache + key: doctor-rst-${{ runner.os }}-${{ steps.extract_base_branch.outputs.branch }} + restore-keys: | + doctor-rst-${{ runner.os }}- + doctor-rst- + - name: "Run DOCtor-RST" uses: docker://oskarstark/doctor-rst with: - args: --short --error-format=github + args: --short --error-format=github --cache-file=/github/workspace/.cache/doctor-rst.cache
Docker
自动构建 Docker-Image,并位于此处: https://cloud.docker.com/u/oskarstark/repository/docker/oskarstark/doctor-rst
您可以在任何给定的目录中运行它,如下所示
docker run --rm -it -e DOCS_DIR='/docs' -v ${PWD}:/docs oskarstark/doctor-rst:latest
本地使用
bin/doctor-rst analyze dummy --group=@Symfony
或
bin/doctor-rst analyze dummy --group=@Sonata
待办事项
- 允许注册自定义规则
- 将逻辑从命令移至服务