Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Hassle-free, cross-platform git hooks for python projects
pip install barb
barb init
Running this command both initializes the .barb
directory as well as runs the barb install
command.
To register the hooks under the .barb
directory with git, run barb install
Create a script under the .barb
directory with the same name as the git hook you are attempting to create.
You can create two types of scripts to work as hooks:
./.barb/pre-commit
---
#!/bin/sh
echo "Hello, World!"
hook()
function. Not all hooks pass arguments, but those that provide
them do so via the args parameter../.barb/pre-push.py
---
def hook(*args):
print('Hello, World!')
Exceptions and False return values from this function will be considered hook failures.
Hooks can be organized in one of two ways. Top level files will be run on each os, without consideration:
.barb
├── pre-commit
└── post-rewrite.py
Alternatively, when organized in folders, different scripts can be set to run depending on the operating system:
.barb
└── post-rewrite
├── linux.py
├── darwin
└── windows.ps1
A configuration file is automatically created when the command barb init
is run. The following are valid configurations
os-lock
os-lock = windows
[os.$OS$.$FILE_EXT$]
interpreter
args
# Special Case: default interpreter for file ext with no interpreter specified
[os.linux.default]
interpreter = 'bash'
# executes ps1 files as "powershell -ExecutionPolicy Unrestricted -File ./.barb/git-hook-name.ps1"
[os.windows.ps1]
interpreter = 'powershell'
args = ['-ExecutionPolicy', 'Unrestricted', '-File']
barb sanitize
to sanitize the hooks?FAQs
Hassle free git hooks for python projects.
We found that barb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.