Skip to content

Ondivi (Only diff violations) is a Python script filtering coding violations, identified by static analysis, only for changed lines in a Git repo.

License

Notifications You must be signed in to change notification settings

blablatdinov/ondivi

Repository files navigation

Ondivi (Only diff violations)

wemake-python-styleguide Lines of code Hits-of-Code

This is a simple Python script designed to filter coding violations (likely identified by a static analyzer) for only the lines that have been changed in a Git repository.

Prerequisites:

  • Python 3.9 or higher
  • Git

Installation

pip install ondivi

Usage

Ensure you are in the root directory of your Git repository.

Run the script:

flake8 script.py | ondivi
ondivi -h
usage: ondivi [-h] [--baseline BASELINE]

Ondivi (Only diff violations).

Python script filtering coding violations, identified by static analysis,
only for changed lines in a Git repo.

Usage example:

flake8 script.py | ondivi

optional arguments:
  -h, --help           show this help message and exit
  --baseline BASELINE  Commit or branch which will contain legacy code. Program filter out violations on baseline (default: "master")

How it Works

The script parses the Git diff output to identify the changed lines in each file.

It then filters the given coding violations to include only those violations that correspond to the changed lines.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Ondivi (Only diff violations) is a Python script filtering coding violations, identified by static analysis, only for changed lines in a Git repo.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published