Giter Site home page Giter Site logo

spellcheck-github-actions's Introduction

spellcheck-github-actions

A Github Action that spell checks JavaScript, Vue, Markdown, HTML, and Text files.

This action uses PySpelling to check source files in the project.

Configuration

If your repo contains spellcheck.yaml it will be used instead of the default config.

See https://facelessuser.github.io/pyspelling/configuration/ for options.

Note it must be .yaml not .yml

Upstream

Based on rojopolis/spellcheck-github-actions

That repo is python centric and was not working for us so we made this fork

Wordlists

You can place a wordlist.txt file in the root of your project.

This will override the default list.

Example Config

This is the default config

# spellcheck.yaml
matrix:
- name: JavaScript
  sources:
  - '**/*.js'
  expect_match: false
  aspell:
    lang: en
  dictionary:
    wordlists:
    - wordlist.txt
    output: wordlist.dic
    encoding: utf-8
  pipeline:
  - pyspelling.filters.javascript:
      jsdocs: true
      line_comments: true
      block_comments: true
      group_comments: false
      decode_escapes: true
      strings: false
- name: Vue
  sources:
  - '**/*.vue'
  expect_match: false
  aspell:
    lang: en
  dictionary:
    wordlists:
    - wordlist.txt
    output: wordlist.dic
    encoding: utf-8
  pipeline:
  - pyspelling.filters.javascript:
      jsdocs: true
      line_comments: true
      block_comments: true
      group_comments: false
      decode_escapes: true
      strings: false
  - pyspelling.filters.html:
      comments: true
      attributes:
      - title
      - alt
      ignores:
      - ':matches(code, pre)'
      - 'code'
      - 'pre'
  - pyspelling.filters.stylesheets:
      group_comments: true
- name: HTML
  sources:
  - '**/*.html'
  expect_match: false
  apsell:
    mode: en
  dictionary:
    wordlists:
    - wordlist.txt
    output: wordlist.dic
    encoding: utf-8
  pipeline:
  - pyspelling.filters.html:
      comments: true
      attributes:
      - title
      - alt
      ignores:
      - ':matches(code, pre)'
      - 'code'
      - 'pre'
- name: Markdown
  expect_match: false
  apsell:
    mode: en
  dictionary:
    wordlists:
    - wordlist.txt
    output: wordlist.dic
    encoding: utf-8
  pipeline:
  - pyspelling.filters.markdown:
      markdown_extensions:
      - markdown.extensions.extra:
  - pyspelling.filters.html:
      comments: true
      attributes:
      - title
      - alt
      ignores:
      - ':matches(code, pre)'
      - 'code'
      - 'pre'
  sources:
  - '**/*.md'
- name: Text
  sources:
  - '**/*.txt|!wordlist.txt'
  ignores:
  expect_match: false
  dictionary:
    wordlists:
    - wordlist.txt
    output: wordlist.dic
    encoding: utf-8
  pipeline:
  - pyspelling.filters.text:
      convert_encoding: utf-8

Example GitHub Action

# .github/workflows/check_spelling.yml
name: Check Spelling
on:
  pull_request:
    paths:
    - '**.js'
    - '**.vue'
    - '**.txt'
    - '**.html'
    - '**.md'
jobs:
  spelling:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        ref: ${{ github.head_ref }}
    - name: Check Spelling
      uses: UnicornGlobal/spellcheck-github-actions@master

spellcheck-github-actions's People

Contributors

rojopolis avatar darrynten avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.