Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Wiki
Manage
Activity
Members
Labels
Plan
Issues
53
Issue boards
Milestones
Wiki
Code
Merge requests
6
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MDM Lab
Wiki
Merge requests
!93
Resolve "front-matter linter"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "front-matter linter"
front-matter-linter
into
main
Overview
0
Commits
12
Pipelines
13
Changes
6
Merged
Remi PLANEL
requested to merge
front-matter-linter
into
main
1 year ago
Overview
0
Commits
12
Pipelines
13
Changes
1
Expand
Closes
#320 (closed)
0
0
Merge request reports
Compare
version 11
version 11
ff5619de
1 year ago
version 10
c43a7019
1 year ago
version 9
f0b6ad0f
1 year ago
version 8
d37f2cdd
1 year ago
version 7
420690bd
1 year ago
version 6
25ec1f79
1 year ago
version 5
e4b91730
1 year ago
version 4
561d4cc8
1 year ago
version 3
bcc5622c
1 year ago
version 2
38d89940
1 year ago
version 1
a098ab70
1 year ago
main (base)
and
latest version
latest version
16641eb3
12 commits,
1 year ago
version 11
ff5619de
11 commits,
1 year ago
version 10
c43a7019
10 commits,
1 year ago
version 9
f0b6ad0f
9 commits,
1 year ago
version 8
d37f2cdd
8 commits,
1 year ago
version 7
420690bd
7 commits,
1 year ago
version 6
25ec1f79
6 commits,
1 year ago
version 5
e4b91730
5 commits,
1 year ago
version 4
561d4cc8
4 commits,
1 year ago
version 3
bcc5622c
3 commits,
1 year ago
version 2
38d89940
2 commits,
1 year ago
version 1
a098ab70
1 commit,
1 year ago
Show latest version
1 file
+
10
−
5
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
packages/df-wiki-cli/df_wiki_cli/content/main.py
+
10
−
5
Options
@@ -7,7 +7,10 @@ from pydantic_yaml import parse_yaml_raw_as, to_yaml_str
import
frontmatter
from
enum
import
Enum
from
rich.console
import
Console
from
rich.pretty
import
pprint
from
rich
import
print
as
rprint
from
rich.layout
import
Layout
from
rich.panel
import
Panel
console
=
Console
()
app
=
typer
.
Typer
()
@@ -53,7 +56,8 @@ def lint(
),
],
):
print
(
f
"
check system
{
file
}
"
)
console
.
rule
(
f
"
[bold blue]
{
file
.
name
}
"
,
style
=
"
blue
"
)
with
open
(
file
)
as
f
:
metadata
,
_
=
frontmatter
.
parse
(
f
.
read
())
# print(metadata)
@@ -65,7 +69,8 @@ def lint(
# print(exc.errors())
# pprint(exc.errors(), expand_all=True)
for
err
in
exc
.
errors
():
console
.
print
(
f
"
{
err
[
'
msg
'
]
}
:
{
err
[
'
type
'
]
}
{
'
,
'
.
join
(
err
[
'
loc
'
])
}
"
,
style
=
"
red
"
)
print
(
"
\n
"
)
console
.
print
(
f
"
[red]
{
err
[
'
msg
'
]
}
:
{
err
[
'
type
'
]
}
{
'
->
'
.
join
(
err
[
'
loc
'
])
}
"
)
else
:
console
.
print
(
"
OK!
\n
"
,
style
=
"
green
"
)
console
.
print
(
"
[green] Everything is alright
"
)