Free program analysis focused on bugs that matter to you.
Project description
Free program analysis focused on bugs that matter to you.
Install, configure, and adopt Bento in seconds. Runs 100% locally.
Bento is a free and opinionated toolkit for gradually adopting linters¹ and program analysis² in your codebase. Be the bug-squashing advocate your team needs but (maybe) doesn’t deserve.
- Find bugs that matter. Bento automatically enables and configures relevant analysis based on your dependencies and frameworks, and it will never report style-related issues. You won’t painstakingly configure your tooling.
- Get started immediately. Bento doesn’t force you to fix all your preexisting issues today. Instead, you can archive them and address them incrementally when it makes sense for your project.
- Go fast. Bento installs in 5 seconds and self-configures in less than 30. Its tools check your code in parallel, not sequentially.
Bento includes checks written by r2c and curated from Bandit, ESLint, Flake8, and their plugins. It runs on your local machine and never sends your code anywhere or to anyone.
Installation
$ pip3 install bento-cli
Bento is for JavaScript, TypeScript, and Python projects. It requires Python 3.6+ and works on macOS Mojave (10.14) and Ubuntu 18.04+.
Usage
To get started right away with sensible defaults:
$ bento init && bento check
To set aside preexisting results so you only see issues in new code:
$ bento archive
Bento really sings when you run it automatically in your editor, as a commit hook (bento install-hook
), or in CI.
Command Line Options
$ bento --help
Usage: bento [OPTIONS] COMMAND [ARGS]...
Options:
--version Show current Bento version.
--agree Automatically agree to terms of service.
--help Show this message and exit.
Commands:
archive Adds all current findings to the whitelist.
check Checks for new findings.
disable Disables a check.
enable Enables a check.
init Autodetects and installs tools.
install-hook Installs Bento as a git pre-commit hook.
Help and Community
- Need help or want to share feedback? Reach out to us at support@r2c.dev. We’d love to hear from you! 💌
- Join #bento in our community Slack for support, to talk with other users, and share feedback. 🤝
- We’re shipping new Bento features all the time. Want to be first to know about what’s new? Sign up for the newsletter so you don’t miss out! We promise not to spam you, and you can unsubscribe at any time. 📫
- We’re fortunate to benefit from the contributions of the open source community and great projects such as Bandit, ESLint, Flake8, and their plugins. 🙏
- You’re also welcome to file an issue directly on GitHub. Or submit a feature request — we welcome those, too!
License and Legal
Please refer to the terms and privacy document.
Copyright (c) r2c.
Changelog
This project adheres to Semantic Versioning.
[0.4.0] - 2019-11-11
Changed
- We updated our privacy policy.
- Notably, we collect email addresses to understand usage and communicate with users through product announcements, technical notices, updates, security alerts, and support messages.
Added
-
Added additional
r2c.click
tool for Click framework:- flake8-click will be disabled by default.
-
Added additional
r2c.flask
tool for Flask framework:- flake8-flask will be disabled by default.
[0.3.1] - 2019-11-08
Fixed
- Fixed an issue where the tool would fail to install if a macOS user
had installed
gcc
and then upgraded their OS. - Fixed a compatibility issue for users with a pre-existing version of GitPython with version between 2.1.1 and 2.1.13.
[0.3.0] - 2019-11-01
Changed
- Bento can now be run from any subdirectory within a project.
- Updated the privacy and terms-of-service statement.
Added
-
File ignores are configurable via git-style ignore patterns (include patterns are not supported). Patterns should be added to
.bentoignore
. -
Added additional checks to the
r2c.flake8
tool:- All checks from flake8-bugbear (except for B009 and B010, which are stylistic in nature).
- All checks from flake8-builtins.
- All checks from flake8-debugger.
- All checks from flake8-executable.
-
Clippy output formatting is now supported.
- To enable, run:
bento check --formatter clippy
- Example output:
- To enable, run:
error: r2c.flake8.E113
--> foo.py:6:5
|
6 | return x
|
= note: unexpected indentation
- Autocompletion is now supported from both
bash
andzsh
. To use:- In
bash
, runecho -e '\neval "$(_BENTO_COMPLETE=source bento)"' >> ~/.bashrc
. - In
zsh
, runecho -e '\neval "$(_BENTO_COMPLETE=source_zsh bento)"' >> ~/.zshrc
.
- In
[0.2.1] - 2019-10-29
Fixed
- Quoted emails in git configuration do not break user registration.
- Removed files properly invalidate results cache.
- Python tools do not crawl
node_modules
.
[0.2.0] - 2019-10-23
Changed
- Results are cached between runs. This means that an immediate rerun of
bento
will be much faster. - Broadened library compatibility, especially for common packages:
- attrs from 18.2.0
- packaging from 14.0
- pre-commit from 1.0.0
r2c.eslint
ignores.min.js
files. Bento should only report issues in code, not built artifacts.- Telemetry endpoint uses
bento.r2c.dev
.
Added
- Bento check will optionally run only on passed paths, using
bento check [path] ...
. - Add
r2c.pyre
as a configurable tool. To enable, it must be manually configured in.bento.yml
. - Formatters can be specified with short names, and these appear in the help text. For example,
bento check --formatter json
. bento
version is passed to telemetry backend.
Fixed
- Tool does not crash if a git user does not have an email configured.
- Fixed a regression that caused progress bars to hang after first tool completed.
- Made fully compatible with Python 3.6.
- Tool does not mangle .gitignore when that file lacks a trailing newline.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file bento-cli-0.4.0.tar.gz
.
File metadata
- Download URL: bento-cli-0.4.0.tar.gz
- Upload date:
- Size: 52.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 239018bd812ba8c825c866cf409572e09eda5571d64e5cbbf13346e39fff8d5e |
|
MD5 | 2632286422a340642e6609c423a0d8a3 |
|
BLAKE2b-256 | 01d8cebdeb07c769d9825d5fa92d461bc372570f90f14bf78270cde2ca9a7aa9 |
File details
Details for the file bento_cli-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: bento_cli-0.4.0-py3-none-any.whl
- Upload date:
- Size: 68.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac57a343252787ad7cc2e15a4b53cbd61e1dcbb3811ac9c8d679a14144d90b7c |
|
MD5 | 68024b439d5b3c29fe50e11f4a74fdd1 |
|
BLAKE2b-256 | 55ae631cd514345558cb788e0742bfdab91583b2dacc11c1bd39ab97966b6043 |