Skip to content

Commit

Permalink
ci: add typo check
Browse files Browse the repository at this point in the history
  • Loading branch information
liby committed Mar 8, 2024
1 parent e665ee5 commit 19a81fa
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/typo-check.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
3 changes: 3 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[default.extend-words]
Ue = "Ue"
ND = "ND"
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/phpdoc-parser/printer/differ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 19a81fa

Please sign in to comment.