Skip to main content

A flake8 linter plug-in for validating that certain Python files comply with a user defined pattern.

Project description

flake8-filename

https://img.shields.io/travis/rcbops/flake8-filename.svg

A flake8 linter plug-in for validating that certain Python files comply with a user defined pattern.

Quick Start Guide

  1. Install flake8-filename from PyPI with pip:

    $ pip install flake8-filename
    
  2. Configure a mark that you would like to validate:

    $ cd project_root/
    $ vi .flake8
    
[flake8]
filename_check1 = filter_regex=test_.+
                  filename_regex=test_[\w-]+$
  1. Run flake8:

    $ flake8 tests/
    

Gotchas

  1. It is highly recommended to use this plugin inside of a virtualenv
  2. A configuration is required by this plugin, if none is found the plugin will throw a N401 validation error for every file

Violation Codes

All possible violation codes are documented in violation_codes

Example Configurations

More example configurations can be found in configuration

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for flake8-filename, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size flake8_filename-1.0.0-py2.py3-none-any.whl (4.4 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page