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.2.0 - 2024-07-21
Add match-diff-lines script on installation. [fschulze]
0.1.0 - 2024-07-21
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.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1abec4748caad2126a0aa59bbaa50d2c8a61bc5bf4cb91ac25f83ad7b74cb3b |
|
MD5 | d364e2a56024a670f9e4592db208845e |
|
BLAKE2b-256 | dcd364d1348b9c1b63fc5a1c4d863b4ae9bb2303ae3a7e22085f7d2ac8fa0853 |