Skip to main content

A Python-native clone of LLVMs FileCheck tool

Project description

filecheck - A Python-native clone of LLVMs FileCheck tool

This tries to be as close a clone of LLVMs FileCheck as possible, without going crazy.

There are some features that are left out for now (e.g. pseudo-numeric variables and parts of numeric substitution).

Features:

  • Checks:
    • CHECK
    • CHECK-NEXT
    • CHECK-NOT (not sure, I think I may have missed something. Docs aren't great on this one.)
    • CHECK-LABEL
    • CHECK-EMPTY
    • CHECK-SAME
    • CHECK-DAG Need to figure this one out exactly
    • CHECK-COUNT (who uses this? Still around ~310 matches in MLIR...)
  • Flags:
    • --check-prefix
    • --check-prefixes
    • --comment-prefixes
    • --allow-unused-prefixes
    • --input-file
    • --match-full-lines
    • --strict-whitespace (Kinda? Seems to be working.)
    • --ignore-case
    • --implicit-check-not
    • --dump-input
    • --dump-input-context
    • --dump-input-filter
    • --enable-var-scope
    • -D<VAR=VALUE>
    • -D#<FMT>,<NUMVAR>=<NUMERIC EXPRESSION>
    • -version
    • -v
    • -vv
    • --allow-deprecated-dag-overlap Not sure what this means yet.
    • --allow-empty (I think I allow empty input rn?)
    • --color No color support yet
  • Base Features:
    • Regex patterns
    • Captures and Capture Matches
    • Numeric Captures
    • Numeric Substitutions (jesus christ, wtf man)
    • Literal matching (CHECK{LITERAL})
    • Weird regex features ([:xdigits:] and friends)
    • Correct(?) handling of matching check lines
  • Testing:
    • Base cases
    • Negative tests
    • Error messages (started)
    • Lots of edge cases
    • MLIR/xDSL integration tests
  • UX:
    • Good error messages: I have some error messages, but could be a lot better
      • Parse errors
      • Matching errors
      • Malformed regexes
  • Infrastructure:
    • Formatting: black
    • Pyright: Almost passes rn
    • pre-commit: Didn't get to it yet
    • CI for formatting

Open to PRs for any such features.

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

filecheck_ng-0.1.0.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

filecheck_ng-0.1.0-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

Details for the file filecheck_ng-0.1.0.tar.gz.

File metadata

  • Download URL: filecheck_ng-0.1.0.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.6.32

File hashes

Hashes for filecheck_ng-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ac22dda7376cd6410fea7c06d568c4c8d1ff905b9262ce2c02d5d5e0fdfea108
MD5 a2b740dfa0fae7b296e1762cc555186d
BLAKE2b-256 6c6fb539c0d6029ce8d9ece6d571c4ae1f4a24ba7bf506d494a429f46b6d1575

See more details on using hashes here.

File details

Details for the file filecheck_ng-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: filecheck_ng-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.6.32

File hashes

Hashes for filecheck_ng-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 89466c2c12ef0deaaf21cfca2ddcf7f673fb8c6cdc2bde13c60027eee136ca36
MD5 ace80d9819d68e41de42535dcba10a07
BLAKE2b-256 73289c882a24517f91ec919e91598693dea28e1c6efd8ae27f9260c0404d8894

See more details on using hashes here.

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