typokana

5.3.0

This command line tool can check spelling and show proposed correction.
ezura/spell-checker-for-swift

What's New

Follow Swift5.3

2020-09-19T11:26:31Z

Changes

  • Follow Swift5.3 (#20)
  • Add .typokana_ignore template (#22)

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 git@github.com:ezura/spell-checker-for-swift.git
$ cd spell-checker-for-swift
$ make

Mint

$ mint install ezura/spell-checker-for-swift@5.3.0

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

Description

  • Swift Tools 5.0.0
View More Packages from this Author

Dependencies

Last updated: Mon Sep 26 2022 14:58:12 GMT-0500 (GMT-05:00)