Intention: Due to a heap of legacy code, I'd like to lint only lines added or changed in my Pull Requests to make the environment gradually better.
Input: Name of the base branch (master
), name of my PR branch (e.g. honzajavorek/my-cool-feature
), hash of the last commit in the feature branch (e.g. 53253a3e8d9b1e3ed7d45b91e045c59d50aefdf0
).
Output: Affected (added or changed, obviously not deleted) line numbers for each file, so I could filter linter output to contain only those.
I'm not looking for a one liner, I'm okay with writing a short bash/Python/node.js script to do this, but only with reasonable complexity (several lines).
Update: Just found Git diff with line numbers (Git log with line numbers). Doesn't really seem to be an easy task :(