Skip to content

Commit 47e8e8c

Browse files
seungparkSeung Park
andauthored
DOP-1166: add validation for icon role (#414)
* add validation check for icon role * initialize icon set once in separate module * remove logs * move const file for import. add font awesome prefixes for set intersection * run make format * remove unused import. fix failing test * convert to python module to export icon set * fix formatting * address comments. use f string, update possible icon set list, update error message * minor. update var name Co-authored-by: Seung Park <[email protected]>
1 parent 2fac2d3 commit 47e8e8c

File tree

5 files changed

+2191
-1
lines changed

5 files changed

+2191
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ htmlcov/
1010
.venv/
1111
dist/
1212
.docs
13-
.vscode
13+
.vscode

snooty/diagnostics.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,3 +696,19 @@ def __init__(
696696
start,
697697
end,
698698
)
699+
700+
701+
class IconMustBeDefined(Diagnostic):
702+
severity = Diagnostic.Level.error
703+
704+
def __init__(
705+
self,
706+
icon_role: str,
707+
start: Union[int, Tuple[int, int]],
708+
end: Union[None, int, Tuple[int, int]] = None,
709+
) -> None:
710+
super().__init__(
711+
f"The Icon {icon_role} does not exist",
712+
start,
713+
end,
714+
)

0 commit comments

Comments
 (0)