globality-corp / flake8-logging-format

Flake8 extension to validate (lack of) logging format strings
Apache License 2.0
134 stars 21 forks source link

Use correct error code format #33

Closed stephenfin closed 1 year ago

stephenfin commented 2 years ago

flake8 has always expected codes to use formats like E123 or W451. More complex codes like COMPANY-UNIT-TESTS-FILEPATH have traditionally worked everywhere except in flake8 configuration files, and attempts to change this have been rejected [1]. The upcoming version of flake8 now enforced this practice everywhere, which is resulting in the following error message when attempting to use flake8-logging-format with master of flake8 [2]:

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

The resolution here is change our code to something that matches this pattern. We use G as this matches the codes provided by this plugin.

[1] https://github.com/PyCQA/flake8/issues/1568 [2] https://github.com/PyCQA/flake8/issues/325

asottile commented 2 years ago

more accurately, that value should match the codes provided by this plugin -- in this case G or G0

stephenfin commented 2 years ago

more accurately, that value should match the codes provided by this plugin -- in this case G or G0

Ah, of course. Updated.

guigarfr commented 1 year ago

can someone with write access review this? @jessemyers @simpleigh-globality @tonybajan-globality

guigarfr commented 1 year ago

will there be a release soon @tonybajan-globality ?

tonybajan-globality commented 1 year ago

@guigarfr Unfortunately the build system on this repo is no longer functioning and I don't have access internally to fix it. I'll see what I can do, but I can't make any promises :(