oskarstark / doctor-rst
Fund package maintenance!
OskarStark
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 36
Watchers: 5
Forks: 21
Open Issues: 24
Type:project
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/phpstan/phpstan-1.12.8
- dev-master
This package is auto-updated.
Last update: 2024-11-07 10:40:58 UTC
README
Lint your documentation against given rules.
Available rules
You can find the available rules here.
Usage
You can use it as a Github Action like this:
# .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
If your *.rst
files are not located in root:
uses: docker://oskarstark/doctor-rst with: args: --short --error-format=github + env: + DOCS_DIR: 'docs/'
Error Formatter
-
detect (default) If running inside GithubActions CI environment,
github
is used, otherwiseconsole
. -
github Used to annotate your pull requests.
-
console Used to generate a human readable output.
To force the usage of a specific formatter, use the --error-format
option.
Use Caching to Speedup your GithubActions builds
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
A Docker-Image is built automatically and located here: https://cloud.docker.com/u/oskarstark/repository/docker/oskarstark/doctor-rst
You can run it in any given directory like this:
docker run --rm -it -e DOCS_DIR='/docs' -v ${PWD}:/docs oskarstark/doctor-rst:latest
Local usage
bin/doctor-rst analyze dummy --group=@Symfony
or
bin/doctor-rst analyze dummy --group=@Sonata
Todos
- Allow to register custom Rules
- Move logic from Command to Services