flake8-copyright-validator
Flake8 plugin for validating copyright text in python files.
Installation
pip install flake8-copyright-validator
How to use
In your config file like setup.cfg under flake8 specify copyright-text wrapping every string with '.
[flake8]
copyright-text = 'Example copyright text'
Available flags
--updateIf difference or lack of copyright was found in file writes copyright text at the beginning of python file.
If specified, value of bytes-to-read is ignored. Careful with this option if your header is incorrect it will add one more on top of wrong header.--bytes-to-readIf your copyright takes more than 2048 bytes or you want to load less text specify this value--detailed-outputProvides detailed output with flake8 error--lines-to-excludeFiles with first line containing value from lines to exclude will not be checked for copyright.
Lines to exclude is not a comma separated list. It's a text that is split by end of line (\n).--symbols-to-replaceYou can wrap your copyright text with symbols, by default it is', it is used for specifying
copyright text that starts with#. You can change it if you don't need it with this flag. It is comma separated list.
How it works
Plugin splits copyright text by end of line (\n), and reads 2048 bytes of file by default.
If differences were found it yields NCF100 No copyright found.
Plugin does not use comma separated lists for text
Complete example of setup.cfg
[flake8]
lines-to-exclude =
'# Generated by Django'
'#!'
copyright-text =
'# Example - Example'
'# Copyright (C) Example'
'#'
'# This program is free software: you can redistribute it and/or modify'
'# it under the terms of the GNU Affero General Public License as published'
Metadata
Release files for flake8-copyright-validator 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flake8-copyright-validator-0.0.1.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flake8_copyright_validator-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.8 kB
Release files / flake8-copyright-validator-0.0.1.tar.gz
| Download URL | flake8-copyright-validator-0.0.1.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb2ae6d3e9158b52d099362042c8d116c38d4b34ab59a85db024b36c6cb437d8
|
|
BLAKE2b-256 checksum How to use checksums |
544d4c01d9f13ff394e3d4e3fbeb1f8e67e4168eb45dabae48a61fbfe93457f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.0
|
Release files / flake8_copyright_validator-0.0.1-py3-none-any.whl
| Download URL | flake8_copyright_validator-0.0.1-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aeb2cf1ad347f353021ba66e46080d9c187842f7d24060c3f7ab29338a97aeb9
|
|
BLAKE2b-256 checksum How to use checksums |
dbbd90c901fa521c20bc592cc29e5f9d6360a6c571de56d2863171d4e1f46784
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.0
|