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
File details
Details for the file match_diff_lines-0.2.0.tar.gz
.
File metadata
- Download URL: match_diff_lines-0.2.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: devpi-server/6.6.0 (py3.8.6; darwin)
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db36c0b4578bbeb76eb6ae12c3d7757acc48f2f8bfcd72e32a3bed5b0f00e3ab |
|
MD5 | cd41628c7301053213fe1fefe58cf8db |
|
BLAKE2b-256 | 8e9789c6b41f2dee7593eddf5f50c71bed8502cc9f0ab84bc5f8ee03f13fbd37 |
File details
Details for the file match_diff_lines-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: match_diff_lines-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: devpi-server/6.6.0 (py3.8.6; darwin)
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1abec4748caad2126a0aa59bbaa50d2c8a61bc5bf4cb91ac25f83ad7b74cb3b |
|
MD5 | d364e2a56024a670f9e4592db208845e |
|
BLAKE2b-256 | dcd364d1348b9c1b63fc5a1c4d863b4ae9bb2303ae3a7e22085f7d2ac8fa0853 |