All Projects β†’ andreoliwa β†’ Nitpick

andreoliwa / Nitpick

Licence: mit
Enforce the same settings across multiple language-independent projects

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Nitpick

JavaScript-Styleguide
πŸ“ƒ The NullDev JavaScript Styleguide
Stars: ✭ 23 (-82.84%)
Mutual labels:  styleguide, linter
sonar-css-plugin
SonarQube CSS / SCSS / Less Analyzer
Stars: ✭ 46 (-65.67%)
Mutual labels:  styleguide, linter
Ue4 Style Guide
An attempt to make Unreal Engine 4 projects more consistent
Stars: ✭ 2,656 (+1882.09%)
Mutual labels:  linter, styleguide
Flake8
The official GitHub mirror of https://gitlab.com/pycqa/flake8
Stars: ✭ 1,112 (+729.85%)
Mutual labels:  linter, styleguide
Pep8speaks
A GitHub app to automatically review Python code style over Pull Requests
Stars: ✭ 546 (+307.46%)
Mutual labels:  linter, styleguide
sonar-gherkin-plugin
SonarQube Cucumber Gherkin Analyzer
Stars: ✭ 33 (-75.37%)
Mutual labels:  styleguide, linter
tryceratops
A linter to prevent exception handling antipatterns in Python (limited only for those who like dinosaurs).
Stars: ✭ 381 (+184.33%)
Mutual labels:  styleguide, linter
ue5-style-guide
An attempt to make Unreal Engine 4 projects more consistent
Stars: ✭ 2,892 (+2058.21%)
Mutual labels:  styleguide, linter
Sonar Jproperties Plugin
SonarQube Java Properties Analyzer
Stars: ✭ 5 (-96.27%)
Mutual labels:  linter, styleguide
Wemake Python Styleguide
The strictest and most opinionated python linter ever!
Stars: ✭ 1,714 (+1179.1%)
Mutual labels:  linter, styleguide
Lesshint
A tool to aid you in writing clean and consistent Less.
Stars: ✭ 119 (-11.19%)
Mutual labels:  linter
Eyo
πŸ¦” CLI for restoring the letter Β«Ρ‘Β» (yo) in russian texts
Stars: ✭ 119 (-11.19%)
Mutual labels:  linter
Mypy
Optional static typing for Python
Stars: ✭ 11,995 (+8851.49%)
Mutual labels:  linter
State Of The Art Shitcode
πŸ’©State-of-the-art shitcode principles your project should follow to call it a proper shitcode
Stars: ✭ 2,207 (+1547.01%)
Mutual labels:  styleguide
Editorconfig Checker
A tool to verify that your files are in harmony with your .editorconfig
Stars: ✭ 119 (-11.19%)
Mutual labels:  linter
Style Dictionary
A build system for creating cross-platform styles.
Stars: ✭ 2,097 (+1464.93%)
Mutual labels:  styleguide
Sscss
Light Sass lib for managing your font-size, margin, padding, and position values across breakpoints.
Stars: ✭ 119 (-11.19%)
Mutual labels:  styleguide
Surelog
SystemVerilog 2017 Pre-processor, Parser, Elaborator, UHDM Compiler. Provides IEEE Design/TB C/C++ VPI and Python AST API.
Stars: ✭ 116 (-13.43%)
Mutual labels:  linter
Css
The CSS design system that powers GitHub
Stars: ✭ 10,670 (+7862.69%)
Mutual labels:  styleguide
Javascript Style Guide
Airbnb JavaScript μŠ€νƒ€μΌ κ°€μ΄λ“œ
Stars: ✭ 132 (-1.49%)
Mutual labels:  styleguide

Nitpick

PyPI GitHub Actions Python Workflow Documentation Status Coveralls Maintainability Test Coverage Supported Python versions Project License Code style: black Dependabot Status semantic-release pre-commit.ci status

Command-line tool and flake8 plugin to enforce the same settings across multiple language-independent projects.

Useful if you maintain multiple projects and are tired of copying/pasting the same INI/TOML/YAML/JSON keys and values over and over, in all of them.

The tool now has an "apply" feature that modifies configuration files directly (pretty much like black and isort do with Python files). See the CLI docs for more info.

Many more features are planned for the future, check the roadmap.

Style file

A "nitpick code style" is a TOML file with the settings that should be present in config files from other tools.

Example of a style:

["pyproject.toml".tool.black]
line-length = 120

["pyproject.toml".tool.poetry.dev-dependencies]
pylint = "*"

["setup.cfg".flake8]
ignore = "D107,D202,D203,D401"
max-line-length = 120
inline-quotes = "double"

["setup.cfg".isort]
line_length = 120
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
combine_as_imports = true

This style will assert that:

Quick setup

To try the package, simply install it (in a virtualenv or globally) and run flake8 on a project with at least one Python (.py) file:

# Install using pip:
$ pip install -U nitpick

# Or using Poetry:
$ poetry add --dev nitpick

$ flake8 .

Nitpick will download and use the opinionated default style file.

You can use it as a template to configure your own style.

Run as a pre-commit hook (recommended)

If you use pre-commit on your project (you should), add this to the .pre-commit-config.yaml in your repository:

repos:
  - repo: https://github.com/andreoliwa/nitpick
    rev: v0.26.0
    hooks:
      - id: nitpick

To install the pre-commit and commit-msg Git hooks:

pre-commit install --install-hooks
pre-commit install -t commit-msg

To start checking all your code against the default rules:

pre-commit run --all-files

For more details on styles and which configuration files are currently supported, see the full documentation.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].