Hi, and thanks for revgrep. I’ve long wanted a tool like this.
It’s not unusual for changes on one line to cause issues on other (often nearby) lines. Currently, revgrep will filter them out. I wish it had an option to match not “same file and line” but at a larger granularity. “Same file” would be a good start, but “within ±n lines” or “same directory k levels up” might be useful, too.
Example:
Begin with the following example.py:
"""Example module."""
import sys
def say_hello():
"""Greet the world."""
sys.stdout.write('hello world')
Commit it, then change the last line to read:
Now Pylint (the usual linter in Python land) complains:
$ pylint -f parseable -s no example.py
************* Module example
example.py:3: [W0611(unused-import), ] Unused import sys
But revgrep filters it out, because it’s not on the changed line:
$ pylint -f parseable -s no example.py |& revgrep -regexp '([a-z.]+):([0-9])+:() (.+)'
Hi, and thanks for revgrep. I’ve long wanted a tool like this.
It’s not unusual for changes on one line to cause issues on other (often nearby) lines. Currently, revgrep will filter them out. I wish it had an option to match not “same file and line” but at a larger granularity. “Same file” would be a good start, but “within ±n lines” or “same directory k levels up” might be useful, too.
Example:
Begin with the following
example.py:Commit it, then change the last line to read:
Now Pylint (the usual linter in Python land) complains:
But revgrep filters it out, because it’s not on the changed line: