Skip to main content

A pre-commit hook, that enforces ASCII content.

Project description

Enforce ASCII

pre-commit

A Python package to find files containing non-ASCII encoded characters. If you find any bugs, issues or anything, please use the issue tracker on GitHub - issues and PRs are welcome ❤️

Install

It's on [PyPi] as ski-lint, you can install it with pip, pipx, etc.

pip install ski-lint

Usage

$ ski-lint --help
usage: ski-lint [-h] [--version] [--check] FILENAME [FILENAME ...]

A pre-commit hook, that rejects files containing non ASCII characters.

positional arguments:
  FILENAME    path to the files to check

optional arguments:
  -h, --help  show this help message and exit
  --version   show program's version number and exit
  --check     return code is `1`, when non-ASCII files are found

Example

$ ski-lint tests/files/*/*.txt
- tests/files/bad/special.txt (Windows-1252): 'there…'
- tests/files/bad/umlaut.txt (utf-8): 'föur', 'käle', 'Åir'

Pre-Commit

This can be used as a pre-commit hook:

- repo: https://github.com/svdimchenko/ski-lint
  rev: v0.1.0
  hooks:
      - id: ski-lint

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ski_lint-0.1.0.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

ski_lint-0.1.0-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page