mirror of
https://github.com/espressif/conventional-precommit-linter.git
synced 2025-08-06 15:00:04 +08:00
change(user-output): update user output marking all issues with message
- Dynamic messages in output report - Color input commit message same as message elements - Tests updated
This commit is contained in:

committed by
Tomas Sebestik

parent
3523578b39
commit
72404cfabb
25
conventional_precommit_linter/helpers.py
Normal file
25
conventional_precommit_linter/helpers.py
Normal file
@ -0,0 +1,25 @@
|
||||
from colorama import Fore
|
||||
from colorama import init
|
||||
from colorama import Style
|
||||
|
||||
init(autoreset=True) # Automatically reset the style after each print
|
||||
|
||||
|
||||
def _color_bold_green(text: str) -> str:
|
||||
return f'{Style.BRIGHT}{Fore.GREEN}{text}'
|
||||
|
||||
|
||||
def _color_purple(text: str) -> str:
|
||||
return f'{Fore.MAGENTA}{text}'
|
||||
|
||||
|
||||
def _color_orange(text: str) -> str:
|
||||
return f'{Fore.YELLOW}{text}'
|
||||
|
||||
|
||||
def _color_blue(text: str) -> str:
|
||||
return f'{Fore.LIGHTBLUE_EX}{text}'
|
||||
|
||||
|
||||
def _color_grey(text: str) -> str:
|
||||
return f'{Fore.LIGHTBLACK_EX}{text}'
|
Reference in New Issue
Block a user