Giter VIP home page Giter VIP logo

pre-commit-pdb-vars's Introduction

pre-commit-pdb-vars

A pre-commit framework hook that prevents variable names matching pdb shortcuts

How to use it:

# Add to your .pre-commit-config.yaml
  - repo: https://github.com/symonk/pre-commit-pdb-vars.git
    rev: 0.2.0
    hooks:
      - id: pdb-vars
 ✘ user@ubuntu  ~/workspaces/pre-commit-pdb-vars   main ✚  pre-commit run --all-files
black....................................................................Passed
Trim Trailing Whitespace.................................................Passed
Fix End of Files.........................................................Passed
Check Yaml...............................................................Passed
Check for case conflicts.................................................Passed
Check docstring is first.................................................Passed
Debug Statements (Python)................................................Passed
Detect Private Key.......................................................Passed
Fix requirements.txt.................................(no files to check)Skipped
isort....................................................................Passed
mypy.....................................................................Passed
flake8...................................................................Passed
pdb-vars.................................................................Failed
- hook id: pdb-vars
- exit code: 1

Prohibited PDB Command name `q` at: /home/si/workspaces/pre-commit-pdb-vars/test_files/fail.py:1:0.
Prohibited PDB Command name `s` at: /home/si/workspaces/pre-commit-pdb-vars/test_files/fail.py:3:0.
Prohibited PDB Command name `enable` at: /home/si/workspaces/pre-commit-pdb-vars/test_files/fail.py:5:0.
Prohibited PDB Command function def `alias` at: /home/si/workspaces/pre-commit-pdb-vars/test_files/fail.py:8:0.
Prohibited PDB Command function def `disable` at: /home/si/workspaces/pre-commit-pdb-vars/test_files/fail.py:13:4.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.