0

I would like my fixme messages to be blue, instead of purple, to differentiate them from other purple messages.

Does Pylint even have colorization options? I can't find any.

I see these things called "formatters", but that sounds more complex than what I need.

(I'd probably write a postprocessing script that changes the ANSI codes on the fly before I'd bother with a formatter, because the latter is more likely for personal reuse. I'd rather avoid anything and just slip a nice option into .plintrc)

example of fixme messages colorized in purple

I tried looking through the documentation, google search, and ChatGPT, but didn't seem to find a suitable option.

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105
ClioCJS
  • 64
  • 3
  • 11

1 Answers1

1

Pylint has a colored text reporter that you could base your own reporter on. The way to use it is the following; see output options: pylint --output-format=json:somefile.json,colorized.

You will need to register your custom reporter to be able to use it

Pierre.Sassoulas
  • 3,733
  • 3
  • 33
  • 48
  • Thanks! That doesn't quite tell me enough to make it happen, but that gets me a lot closer. Don't suppose you would know how to write the reporter in mind? Say I just wanted 'fixmes' to be blue instead, without anything else being changed, how would I do that? – ClioCJS Jun 01 '23 at 03:23
  • In `def handle_message(self, msg: Message) -> None:` check what is in the ``msg`` variable and treat fixmes differently than the other messages. – Pierre.Sassoulas Jun 01 '23 at 10:13
  • Clever, Pierre, but at that point, it would be easier for me to postprocess my results with sed and change the ansi color code otherwise i'm essentilally creating a personal fork of pylint – ClioCJS Jun 08 '23 at 12:46