nocjk

February 8, 2026 ยท View on GitHub

License: MIT nocjk Action Go Reference Go Report Card CI codecov

Detect CJK (Chinese, Japanese, and Korean) text in your repository.

  • GitHub Action: fail the workflow when CJK text is detected
  • CLI: scan files and exit with code 1 when CJK text is detected
  • Library: functions to find CJK lines in strings

GitHub Action

This action runs the nocjk CLI built from the same Git reference as the action itself, ensuring the action version and the CLI version always match.

Usage

jobs:
  check-cjk:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Detect CJK text
        uses: aethiopicuschan/nocjk@v1
        with:
          args: "."

Inputs

NameDescriptionDefault
argsPaths or arguments passed to nocjk.
ignore_chineseIgnore Chinese textfalse
ignore_japaneseIgnore Japanese textfalse
ignore_koreanIgnore Korean textfalse

Exit Codes

  • 0: No CJK text found (workflow succeeds)
  • 1: CJK text detected (workflow fails)

Ignore Rules

You can define ignore rules using a .nocjkignore file in your project root. The format is fully compatible with .gitignore. Files and directories matching the patterns in this file will be skipped during CJK text detection.

CLI

Installation

go install github.com/aethiopicuschan/nocjk/cmd/nocjk@v1

Usage

nocjk .

When CJK text is detected, the CLI exits with error code 1.

Options

  • --ignore-chinese to ignore Chinese text
  • --ignore-japanese to ignore Japanese text
  • --ignore-korean to ignore Korean text

.nocjkignore is supported for skipping specific files and directories.

Library

Installation

go get -u github.com/aethiopicuschan/nocjk/pkg/nocjk

See GoDoc for usage instructions.