Perform a set of checks on an RFC input file to check for errors.
Project description
There are a number of tasks that need to be performed when an Internet-Draft is begin process to create an RFC. This tool performs a subset of those actions.
The actions performed are:
- Validate the file is well formed XML and that it conforms to the XML2RFC Version 3 schema as defined in RFC 7991.
- Verify that embedded XML stanzas are well formed.
- Verify that embedded ABNF is complete and well formed.
- Identify misspelled words.
- Detect duplicate words.
The tool can be used either in an interactive mode or in batch mode.
Usage
rfclint accepts a single XML document as input and optionally outputs a modified version
of the document.
Basic Usage
rfclint [options] SOURCE
General Options
| Short | Long | Description |
|---|---|---|
-C |
--clear-cache |
purge the cache and exit |
-N |
--no-network |
don't use the network to resolve references |
-n |
--no-rng |
don't check against the RNG schema |
-q |
--quiet |
don't print anything |
. |
--save-config |
save configuration back to config file |
-v |
--verbose |
print extra information |
-V |
--version |
display the version number and exit |
. |
--no-xml |
don't check xml examples for well-formness |
. |
--bcp14 |
do checking for bcp14 keywords |
. |
--no-svgcheck |
skip check svg for limited vocabulary |
-c DIRECTORY |
--cache=DIRECTORY |
specify the primary cache directory to write to |
. |
--configfile=FILENAME |
specify the configuration file to use |
-o FILENAME |
--out=FILENAME |
specify an output filename |
. |
--extract=TYPE |
extract all source code for the given type |
Spelling Options
The following options affect how the spell checking is performed.
| Short | Long | Description |
|---|---|---|
. |
--no-dup-detection |
don't perform duplicate detection |
. |
--no-spell |
don't perform spell checking on the source |
. |
--no-suggest |
don't provide suggestions for misspelled words |
. |
--skip-code |
skip code elements when checking |
. |
--skip-artwork |
skip artwork elements check checking |
. |
--no-curses |
don't do window based |
. |
--color=TEXT |
specify the color to use for word highlighting |
. |
--dictionary=FILENAME |
specify an additional dictionary to use |
. |
--personal=FILENAME |
specify the personal dictionary to use |
. |
--spell-program=FILENAME |
program to use for spell checking |
. |
--spell-window=NUM |
how many words to display as part of the context |
It is assumed that the spell checking program is aspell and that aspell is on the path.
For Windows systems, it additionally look in C:\Program Files (x86)\Aspell\bin for the program.
If a different program is given, then it should be either an absolute path or on the path so that it can be located.
When a misspelled word is located, a certain amount of context will be provided along with the file and line number of the word. The spell-window parameter controls how many words are displayed with up to that number of words being displayed before and after the misspelled word. The context window is also restricted to the current paragraph.
The color option allows for the misspelled word to be highlighted, but it requires VT100 terminal emulation and thus may not always work well on Windows systems. The color defaults to bright on non-Windows systems and none on Windows systems.
If the value of spell-window is 0, then no context will be displayed.
ABNF Checking Options
| Short | Long | Description |
|---|---|---|
. |
--no-abnf |
don't perform abnf checking on the source |
. |
--abnf-add-rules |
ABNF file to include when checking |
. |
--abnf-program=FILENAME |
specify program to use for ABNF checking |
Configuration File
rfclint keeps configuration information in a configuration file. By default the file is stored at
- On Windows:
C:\Users\USER\AppData\Local\rfclint\IETF\rfclint.cfg - Otherwise:
/home/USER/.local/share/rfclint/rfclint.cfg
The format of the configuration file is the standard INI file format.
Spell Configuration
program- name of the spelling program to use - defaults toaspellwindow- number of words to display on each side of a misspelled wordcolor- color to use to highlight the misspelled wordsuggest- Should suggested values be displayed? value is0or1dictionaries- a comma separated list of dictionaries to include
ABNF Configuration
program- name of the ABNF program to use - defaults to bap provided w/rfclint(bap is only installed for systems identified as nt, darwin or linux*)addRules- name of file to be processed along with rules in the source
Windows and Curses
The version of python that ships on windows does not include a copy of the curses module as part of it.
If interactive spell checking or duplicate detection is desired on a windows system then a curses module will need to be installed independent of this package.
One place to locate a curses Python extension an be found at https://www.lfd.uci.edu/~gohlke/pythonlibs/.
If no curses library is detected, rfclint will automatically turn on the --no-curses option.
Dependencies
Various features on rfclint depends on the following external packages:
Running rfclint tests for development
tox
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rfclint-1.0.0.tar.gz.
File metadata
- Download URL: rfclint-1.0.0.tar.gz
- Upload date:
- Size: 29.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
663ad1be1f221c08026dfa406208b654d776fa4f485b0c06844bd4147f645ea6
|
|
| MD5 |
8c7c7f299f0b4a718097d213d7b0c357
|
|
| BLAKE2b-256 |
ba6418d951dbae3e866574e4d436897d82463768f961019d93e62ec77735b3c0
|
Provenance
The following attestation bundles were made for rfclint-1.0.0.tar.gz:
Publisher:
pypi-publish.yml on ietf-tools/rfclint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rfclint-1.0.0.tar.gz -
Subject digest:
663ad1be1f221c08026dfa406208b654d776fa4f485b0c06844bd4147f645ea6 - Sigstore transparency entry: 766584699
- Sigstore integration time:
-
Permalink:
ietf-tools/rfclint@f202905b4a511c49992e21f2391cb16492b5c646 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ietf-tools
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@f202905b4a511c49992e21f2391cb16492b5c646 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file rfclint-1.0.0-py3-none-any.whl.
File metadata
- Download URL: rfclint-1.0.0-py3-none-any.whl
- Upload date:
- Size: 30.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6200c9df7a1eca58fa3ab2b291b7b29a5803613648985517b1ea2731c292906
|
|
| MD5 |
d9515cb3db3aff1935cce1c6aa316392
|
|
| BLAKE2b-256 |
3b0941310a9200bee721837ab864020849258adc7d233f38f10600e54895ebcc
|
Provenance
The following attestation bundles were made for rfclint-1.0.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on ietf-tools/rfclint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rfclint-1.0.0-py3-none-any.whl -
Subject digest:
e6200c9df7a1eca58fa3ab2b291b7b29a5803613648985517b1ea2731c292906 - Sigstore transparency entry: 766584701
- Sigstore integration time:
-
Permalink:
ietf-tools/rfclint@f202905b4a511c49992e21f2391cb16492b5c646 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ietf-tools
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@f202905b4a511c49992e21f2391cb16492b5c646 -
Trigger Event:
workflow_dispatch
-
Statement type: