Skip to main content

static analysis of Apertium files

Project description

apertium-lint

linter for Apertium source files

This package provides the command-line tool apertium-lint which statically analyzes Apertium source files for potential issues.

The linter can be run on a single file, giving output like

$ apertium-lint modes.xml
modes.xml
Error (install-deps) on line 8: Debug modes using files in .deps/ should not be installed.
Error (install-deps) on line 25: Debug modes using files in .deps/ should not be installed.
Error (install-deps) on line 91: Debug modes using files in .deps/ should not be installed.
Errors: 3 Warnings: 0 Suggestions: 0 Nitpicks: 0

or it can be run without arguments, which will apply it to the entire current directory

$ apertium-lint
./modes.xml
Error (install-deps) on line 8: Debug modes using files in .deps/ should not be installed.
Error (install-deps) on line 25: Debug modes using files in .deps/ should not be installed.
Error (install-deps) on line 91: Debug modes using files in .deps/ should not be installed.
./paper/paper.tex
Warning (unnorm) on line 113: Line contains non-normalized characters.
Errors: 3 Warnings: 1 Suggestions: 0 Nitpicks: 0

With option -s, statistics about the files will also be gathered.

$ apertium-lint -s apertium-kir.kir.twol
apertium-kir.kir.twol
Input alphabet symbols:	169
Output alphabet symbols:	139
Rules:	61
Sets:	35
Alphabet symbol pairs:	169
Errors: 0 Warnings: 0 Suggestions: 0 Nitpicks: 0

Prerequisites:

Installation:

If you have pipx installed, you can just do:

$ pipx install apertium-lint

(Alternatively, pip install apertium-lint should also work, but plain pip can make a bit of a mess if you have lots of packages installed on your user.)

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

apertium_lint-1.0.12.tar.gz (35.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apertium_lint-1.0.12-py3-none-any.whl (42.1 kB view details)

Uploaded Python 3

File details

Details for the file apertium_lint-1.0.12.tar.gz.

File metadata

  • Download URL: apertium_lint-1.0.12.tar.gz
  • Upload date:
  • Size: 35.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for apertium_lint-1.0.12.tar.gz
Algorithm Hash digest
SHA256 ef967e635e2905e9a8332425bed601754965392a10371c5f5ff68fda4c4277a3
MD5 e568f247f43546ec54af9b8af9e89ec5
BLAKE2b-256 189b5c0f88da13fa7cafbe7b3382e66f7f82aee33d4b0d6028b6aebfd00ef7bf

See more details on using hashes here.

File details

Details for the file apertium_lint-1.0.12-py3-none-any.whl.

File metadata

  • Download URL: apertium_lint-1.0.12-py3-none-any.whl
  • Upload date:
  • Size: 42.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for apertium_lint-1.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 47832a83a9347a0bbb16cfa4b20a7e5929b53b9cb07eaea511723626ce8de33c
MD5 f8ba5357219f2d66706965765d71bc72
BLAKE2b-256 1933e2c2fce01f8c41fe0b9e77a7f421524df379b7f4d8f0192986132c4e4856

See more details on using hashes here.

Supported by

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