Coder Social home page Coder Social logo

rustamg / spell-checker-for-swift Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ezura/spell-checker-for-swift

0.0 0.0 0.0 2.04 MB

This command line tool can check spelling and show proposed correction.

License: MIT License

Swift 98.87% Makefile 1.13%

spell-checker-for-swift's Introduction

No more "Fix typo" commit...!

This command line tool can check spelling and show proposed correction.

Installation

Binary

We can download binary from here.

Makefile

$ git clone [email protected]:ezura/spell-checker-for-swift.git
$ cd spell-checker-for-swift
$ make
$ mint install ezura/[email protected]

Usage

With Xcode

Set up

Run typokana init in the same directory as xcodeproj file.

Add run script

To display warnings on Xcode, add a script into "Run Script Phase".

if which typokana >/dev/null; then
  typokana --diff-only
else
  echo "`typokana` is not installed."
fi

This setting is searching typos only in changed swift files (fetched with git diff).

If you want to select a target directory, add the directory path.

if which typokana >/dev/null; then
  typokana /Sources
else
  echo "`typokana` is not installed."
fi

Command

typokana init

Prepare a list of words that the spell checker ignores.
typokana init creates ".typokana_ignore" in the current directory.

typokana

Search typo in all swift files.
Show warning for typo on Xcode when this command is run at "Run Script".

typokana -diff

This command is recommended.
Search typo only in changed swift files (fetched with git diff).

typokana --language

Change the language to use for spell checking, e.g. "en_US" (defaults to using the system language). (typokana --language en_US)

typokana --help

(typokana --help)

OVERVIEW: Spell check

USAGE: typokana [options] argument

OPTIONS:
  --diff-only, -diff   Check only files listed by `git diff --name-only`
  --language, -l       The language to use for spell checking, e.g. "en_US" (defaults to using the system language).
  --help               Display available options

POSITIONAL ARGUMENTS:
  path | init          Path to target file | set up typokana

How to ignore words

  1. Create file named ".typokana_ignore"
  2. Write ignored words with line breaks

For example, if you don't want to display warnings for "typokana", "json" and "yuka", please write following text in ".typokana_ignore".

typokana
json
yuka

spell-checker-for-swift's People

Contributors

ezura avatar rustamg avatar nicholaslythallyf avatar bntr 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.