Giter Club home page Giter Club logo

fiasko_bro's Introduction

Fiasko Bro

When flake8 is not enough.
Build Status codecov Documentation Status Maintainability PyPI version

Fiasko is a static analysis tool for Python code that catches common style errors.

http://melevir.com/static/fiasko.jpg

Example

From command line:

$ fiasko -p ~/projects/fiasko_bro
commit_messages_from_blacklist              add files via upload
too_many_pep8_violations                    33 PEP8 violations
too_difficult_by_mccabe                     has_changed_readme
star_import                                 __init__.py
local_import                                setup.py
has_variables_from_blacklist                name, n
short_variable_name                         i, r, n, t, l
file_too_long                               ast_helpers.py
too_nested                                  code_validator.py:54
indent_not_multiple_of_tab_size             ast_helpers.py:130
variables_that_shadow_default_names         slice
==================================================
Total 11 violations

See fiasko --help for more CLI arguments.

From Python code:

>>> from fiasko_bro import validate
>>> validate('/user/projects/fiasko_bro/')
[('commit_messages_from_blacklist', 'add files via upload'), ('too_many_pep8_violations', '33 PEP8 violations'), ('too_difficult_by_mccabe', 'has_changed_readme'), ('star_import', '__init__.py'), ('local_import', 'setup.py'), ('has_variables_from_blacklist', 'name, n'), ('short_variable_name', 'n, r, l, t, i'), ('file_too_long', 'ast_helpers.py'), ('too_nested', 'code_validator.py:54'), ('indent_not_four_spaces', 'ast_helpers.py:130'), ('variables_that_shadow_default_names', '_, slice')]

The validate method returns list of tuples which consist of an error slug and an error message.

Fiasko has a flexible Python API which you can read more about in the docs.

Installation

With pip:

pip install fiasko_bro

With Pipenv:

pipenv install fiasko_bro

Or just clone the project and install the requirements:

$ git clone https://github.com/devmanorg/fiasko_bro.git
$ cd fiasko_bro
$ pip install -r requirements.txt

Docs

fiasko-bro.readthedocs.io

Contributing

To contribute, pick an issue to work on and leave a comment saying that you've taken the issue. Don't forget to mention when you want to submit the pull request.

You can read more about contribution guidelines in the docs

If your suggestion (or bug report) is new, be sure to create an issue first.

Launch tests

python -m pytest

Versioning

We follow semantic versioning.

fiasko_bro's People

Contributors

melevir avatar askanio234 avatar ranc58 avatar ttestsett avatar efueger avatar

Watchers

James Cloos avatar Kalinin Konstantin avatar

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.