Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/savoirfairelinux/flake8-copyright
Adds copyright checks to flake8
https://github.com/savoirfairelinux/flake8-copyright
Last synced: about 2 months ago
JSON representation
Adds copyright checks to flake8
- Host: GitHub
- URL: https://github.com/savoirfairelinux/flake8-copyright
- Owner: savoirfairelinux
- License: lgpl-3.0
- Created: 2014-05-27T17:52:09.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2023-09-18T16:32:19.000Z (10 months ago)
- Last Synced: 2024-05-06T23:20:23.910Z (about 2 months ago)
- Language: Python
- Size: 26.4 KB
- Stars: 15
- Watchers: 8
- Forks: 15
- Open Issues: 9
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
- License: COPYING
Lists
- awesome-flake8-extensions - flake8-copyright - Adds copyright checks to flake8. (Comments)
README
Flake8 Copyright plugin
=======================Checks for copyright notices in all python files. It runs a simple regular expression search for
strings like::Copyright 2014
Copyright (C) 2014```` can be anything unless you specify it with the ``copyright-author`` option (see below).
Install
-------Install with pip::
pip install flake8-copyright
Then, activate copyright checks in your flake8 configuration with::
copyright-check = True
# C errors are not selected by default, so add them to your selection
select = E,F,W,CFurther options
---------------copyright-min-file-size
Minimum number of characters in a file before requiring a copyright notice. This is to avoid
forcing yourself to add copyright notices to very small or empty files. Default: ``0``.copyright-author
Checks for a specific author in the copyright notice.copyright-regexp
If you're not happy with the regexp that is ran to look for copyright notices, you can change it
with this option. Default: ``Copyright\s+(\(C\)\s+)?\d{4}([-,]\d{4})*\s+%(author)s``. ``%(author)s`` is
replaced by the contents of ``copyright-author``.