diff --git a/.github/spelling/allow.txt b/.github/spelling/allow.txt new file mode 100644 index 000000000..9c61c050d --- /dev/null +++ b/.github/spelling/allow.txt @@ -0,0 +1,7 @@ +Agentverse +Fetch.ai +DeltaV +ASI +FET +AI-Engine + diff --git a/.github/spelling/patterns.txt b/.github/spelling/patterns.txt new file mode 100644 index 000000000..37ba1445a --- /dev/null +++ b/.github/spelling/patterns.txt @@ -0,0 +1,53 @@ +# Ignore fenced code blocks (```...```) +^```.*$ +.*```$ + +# Ignore inline code (text wrapped in single backticks ``) +`[^`]+` + +# Ignore URLs (starting with http, https, or ftp) +(?:https?|ftp)://\S+ + +# Ignore data URIs (used in HTML/CSS) +^data:\S* + +# Ignore git commits +\b[0-9a-f]{7,40}\b + +# Ignore image paths with extensions (e.g., .jpg, .png, .gif, etc.) +\S+\.(jpg|jpeg|png|gif|svg|webp|ico)$ + +# Ignore email addresses +\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b + +# Ignore file paths (e.g., /path/to/file) +(?:\/[A-Za-z0-9._-]+)+ + +# Ignore code-related file extensions (e.g., .js, .css, .html, etc.) +\S+\.(js|ts|css|scss|html|json|mdx|md)$ + +# Ignore hex colors in CSS (e.g., #FFFFFF) +#[0-9a-fA-F]{3,6}\b + +# Ignore HTML tags +<[^>]+> + +# Ignore CSS class selectors (e.g., .class-name) +\.[a-zA-Z_][a-zA-Z0-9_-]* + +# Ignore ID selectors in CSS (e.g., #id-name) +#[a-zA-Z_][a-zA-Z0-9_-]* + +# Ignore names of people or company-specific terms +\bfetchai\b +\bAgentverse\b + +# Ignore HTML attributes (e.g., class, id, style) +\b(class|id|style|href|src|alt|title|rel|type|name|value|action|method)\b + +# Custom Rule: Ignore words that start with 'fetch1...' +\bfetch1\w*\b + +# Capitalization Rule: Check proper capitalization for company and personal names +\b[A-Z][a-z]+(?:\s[A-Z][a-z]+)*\b +# This checks that names start with a capital letter and contain lowercase letters diff --git a/.github/spelling/reject.txt b/.github/spelling/reject.txt new file mode 100644 index 000000000..442ad3c08 --- /dev/null +++ b/.github/spelling/reject.txt @@ -0,0 +1,49 @@ +# Ignore specific incorrect spellings or patterns +^attache$ +^bellow$ +benefitting +occurences? +^dependan.* +^oer$ +Sorce +^[Ss]pae.* +^untill$ +^untilling$ +^wether.* + +# Ignore words starting with 'fetch1...' +^fetch1\w* + +# Ignore fenced code blocks (```...```) +^```.*$ +.*```$ + +# Ignore inline code (text wrapped in single backticks ``) +`[^`]+` + +# Ignore URLs +^(?:https?|ftp)://\S+ + +# Ignore data URIs +^data:\S* + +# Ignore file paths with specific extensions +\S+\.(jpg|jpeg|png|gif|svg|webp|ico)$ + +# Ignore email addresses +\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b + +# Ignore HTML tags +<[^>]+> + +# Ignore CSS class selectors +\.[a-zA-Z_][a-zA-Z0-9_-]* + +# Ignore ID selectors in CSS +#[a-zA-Z_][a-zA-Z0-9_-]* + +# Ignore certain code-related file extensions +\S+\.(js|ts|css|scss|html|json|mdx|md)$ + +# Ignore git commit hashes +\b[0-9a-f]{7,40}\b \ No newline at end of file diff --git a/.github/workflows/check-spelling.yml b/.github/workflows/check-spelling.yml new file mode 100644 index 000000000..7277eea85 --- /dev/null +++ b/.github/workflows/check-spelling.yml @@ -0,0 +1,54 @@ +name: Check Spelling + +on: + push: + branches: + - "**" + tags-ignore: + - "**" + pull_request_target: + branches: + - "**" + types: + - opened + - reopened + - synchronize + issue_comment: + types: + - created + +jobs: + spelling: + name: Check Spelling + permissions: + contents: read + pull-requests: read + actions: read + security-events: write + outputs: + followup: ${{ steps.spelling.outputs.followup }} + runs-on: ubuntu-latest + if: ${{ contains(github.event_name, 'pull_request') || github.event_name == 'push' }} + concurrency: + group: spelling-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: check-spelling + id: spelling + uses: check-spelling/check-spelling@main + with: + spellcheck_dir: pages + + filters: pages/** + + suppress_push_for_open_pull_request: ${{ github.actor != 'dependabot[bot]' && 1 }} + checkout: true + check_file_names: 1 + spell_check_this: check-spelling/spell-check-this@prerelease + post_comment: 0 + use_magic_file: 1 + report-timing: 1 + warnings: bad-regex,binary-file,deprecated-feature,large-file,limited-references,no-newline-at-eof,noisy-file,non-alpha-in-dictionary,token-is-substring,unexpected-line-ending,whitespace-in-dictionary,minified-file