savoirfairelinux / flake8-copyright

Adds copyright checks to flake8
GNU Lesser General Public License v3.0
15 stars 15 forks source link

Separate min length for max read size #1

Open jayvdb opened 9 years ago

jayvdb commented 9 years ago

https://github.com/wikimedia/pywikibot-core/blob/master/pywikibot/exceptions.py is an example of a very long docstring, which would require a large read size, however we want a low read size to avoid needing to add copyright notices to empty __init__ files.

jayvdb commented 9 years ago

A simple fix is https://github.com/jayvdb/flake8-copyright/commit/c49be8856e82dd7348781285e62b28950ba09698

A better fix would be to replace the 'min' file size with a check whether the file contains any code. If it has code, it needs a copyright notice.

jayvdb commented 9 years ago

@xzise implemented a 'no code' check for another flake8 plugin. https://github.com/xZise/flake8-future-import/commit/caf784322c98237ac1ac49a8575431a083197832#diff-29e1ed16c670c8b3c96eb9f7423d70ecR29 Would you be happy with a change implementing a similar approach for this plugin?