No project description provided
Project description
match-diff-lines
Match a diff to a list of lines from linters and other tools like flake8 or ruff.
Installation
Best to install into a virtual environment with a Python installer like pip or similar.
Usage
Invoke python -m match_diff_lines diff_file tool_output. The diff_file is a file containing the unified diff output you want to check against. The tool_output contains the output of your linter/tool which contains lines in the form of filename:line_num for example:
match_diff_lines.py:59:39: E271 multiple spaces after keyword
If any lines are contained in the diff, then they are printed and exit code 1 is returned.
With bash or zsh you can use temporary named pipes like this:
% python -m match_diff_lines <(git diff HEAD^) <(ruff check)
Changelog
0.1.0 - Unreleased
Initial release. [fschulze]
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
Hashes for match_diff_lines-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8667e34495b2ed4fa00dace5985e7449fd1ba00f471a2a02a3fb21a4477c657f |
|
MD5 | 3f8679d6488c1bd0062d94c1035cc291 |
|
BLAKE2b-256 | fb1ee5006f01d7f00079b2a064fadf58a5be5d39735b510f44f9fbeebfdd9527 |