diff --git a/.github/workflows/typo-check.yml b/.github/workflows/typo-check.yml new file mode 100644 index 0000000..84e6eca --- /dev/null +++ b/.github/workflows/typo-check.yml @@ -0,0 +1,21 @@ +name: Typo Check +on: [pull_request] + +jobs: + typo-check: + runs-on: ubuntu-latest + timeout-minutes: 10 + env: + FORCE_COLOR: 1 + TYPOS_VERSION: v1.19.0 + steps: + - name: download typos + run: curl -LsSf https://github.com/crate-ci/typos/releases/download/$TYPOS_VERSION/typos-$TYPOS_VERSION-x86_64-unknown-linux-musl.tar.gz | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin + + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: check typos + run: typos diff --git a/README.md b/README.md index 1cc6dcd..a590047 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Next-gen PHPDoc parser with support for intersection types and generics(TypeScri This parser is inspired by the PHPStan's phpdoc-parser library: https://github.com/phpstan/phpdoc-parser -this libraray `@rightcapital/phpdoc-parser` represents PHPDocs with an AST (Abstract Syntax Tree). It supports parsing and modifying PHPDocs by using `TypeScript`/`JavaScript`. +This library `@rightcapital/phpdoc-parser` represents PHPDocs with an AST (Abstract Syntax Tree). It supports parsing and modifying PHPDocs by using `TypeScript`/`JavaScript`. For the complete list of supported PHPDoc features check out PHPStan documentation. diff --git a/_typos.toml b/_typos.toml new file mode 100644 index 0000000..5d98a48 --- /dev/null +++ b/_typos.toml @@ -0,0 +1,3 @@ +[default.extend-words] +Ue = "Ue" +ND = "ND" \ No newline at end of file diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 95355eb..99ebfc6 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -7,7 +7,7 @@ Please note we have a [code of conduct](CODE_OF_CONDUCT.md), please follow it in To set up a development environment, please follow these steps: -1. Before cloning the repo, ensure you have the following softwares installed. +1. Before cloning the repo, ensure you have the following software installed. - `Node.js` (You should install a [version manager](https://github.com/shadowspawn/node-version-usage) that could handle .node-version file) - `pnpm` (You might have already installed it if you enabled the [Corepack](https://nodejs.org/api/corepack.html) feature) diff --git a/src/phpdoc-parser/printer/differ.ts b/src/phpdoc-parser/printer/differ.ts index 470f3c1..fc973b5 100644 --- a/src/phpdoc-parser/printer/differ.ts +++ b/src/phpdoc-parser/printer/differ.ts @@ -10,7 +10,7 @@ import { DiffElem, DiffElemType } from './diff-elem'; * * Implements the Myers diff algorithm. * - * Myers, Eugene W. "An O (ND) difference algorithm and its variations." + * Myers, Eugene W. "An O(ND) difference algorithm and its variations." * Algorithmica 1.1 (1986): 251-266. * * @template T