mirror of
https://github.com/Hopiu/djLint.git
synced 2026-05-15 08:33:11 +00:00
fixed lint
This commit is contained in:
parent
35474de863
commit
94113a85e4
1 changed files with 2 additions and 1 deletions
|
|
@ -61,6 +61,7 @@ def load_pyproject_settings(src: Path) -> Dict:
|
|||
|
||||
|
||||
def validate_rules(rules: List) -> List:
|
||||
"""Validate a list of linter rules. Returns valid rules."""
|
||||
clean_rules = []
|
||||
|
||||
for rule in rules:
|
||||
|
|
@ -69,7 +70,7 @@ def validate_rules(rules: List) -> List:
|
|||
name = rule["rule"].get("name", "undefined")
|
||||
if "name" not in rule["rule"]:
|
||||
warning += 1
|
||||
echo(Fore.RED + f"Warning: A rule is missing a name! 😢")
|
||||
echo(Fore.RED + "Warning: A rule is missing a name! 😢")
|
||||
if "patterns" not in rule["rule"]:
|
||||
warning += 1
|
||||
echo(Fore.RED + f"Warning: Rule {name} is missing a pattern! 😢")
|
||||
|
|
|
|||
Loading…
Reference in a new issue