savoirfairelinux / flake8-copyright

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

Fix registration of plugin #9

Closed dopplershift closed 2 years ago

dopplershift commented 6 years ago

According to the flake8 plugin docs, the entry point name should be the error code prefix that will be emitted from the plugin. Otherwise, apparently flake8 will silently discard messages. Fix that by registering under C801.

dopplershift commented 6 years ago

See for reference: http://flake8.pycqa.org/en/latest/plugin-development/registering-plugins.html

peterjc commented 5 years ago

Does this fix #10?

dopplershift commented 5 years ago

Possibly? Not sure what the root cause of #10 is.

Paul-AUB commented 3 years ago

Tested with flake8==3.9.1, it works.

Without this fix, you must specify select = C in the config file (and it didn't work with extend-select). It's really a bargain as it doesn't work the same way as every other plugins which defaultly select their error codes when installed. So in my project I would need to know and select manually every code of every plugin...

I am very interrested in this fix, would it be considered to have a release with it ? (I see last activity in 2019)

toofar commented 2 years ago

Looks like the plugin requires this change to work at all with flake 5.0, see https://github.com/PyCQA/flake8/issues/325

I'm getting

There was a critical error during execution of Flake8: plugin code for flake8-copyright[flake8_copyright] does not match ^[A-Z]{1,3}[0-9]{0,3}$