Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
ximperconf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
ximperconf
Commits
725ccfc3
Verified
Commit
725ccfc3
authored
Feb 15, 2026
by
Kirill Unitsaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hyprland/module: deduplicate verify-config output and add json format for check
parent
841688ec
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
4 deletions
+31
-4
actions.go
hyprland/actions.go
+15
-0
commands.go
hyprland/commands.go
+2
-0
manager.go
hyprland/manager.go
+14
-4
No files found.
hyprland/actions.go
View file @
725ccfc3
...
...
@@ -40,6 +40,13 @@ func HyprlandCheckCommand(ctx context.Context, cmd *cli.Command) error {
return
err
}
if
config
.
IsJSON
(
cmd
)
{
if
result
==
nil
{
result
=
[]
HyprConfigError
{}
}
return
ui
.
PrintJSON
(
result
)
}
if
len
(
result
)
==
0
{
color
.
Green
(
locale
.
T
(
"No errors"
))
return
nil
...
...
@@ -90,6 +97,14 @@ func HyprlandModuleCheckCommand(ctx context.Context, cmd *cli.Command) error {
return
err
}
if
config
.
IsJSON
(
cmd
)
{
jsonErrors
:=
make
([]
ModuleErrorJSON
,
len
(
result
))
for
i
,
e
:=
range
result
{
jsonErrors
[
i
]
=
ModuleErrorJSON
{
Line
:
e
.
Line
,
Text
:
e
.
Text
}
}
return
ui
.
PrintJSON
(
jsonErrors
)
}
if
len
(
result
)
==
0
{
color
.
Green
(
locale
.
T
(
"No errors"
))
return
nil
...
...
hyprland/commands.go
View file @
725ccfc3
...
...
@@ -41,6 +41,7 @@ func CommandList() *cli.Command {
{
Name
:
"check"
,
Usage
:
locale
.
T
(
"Check the Hyprland config"
),
Flags
:
[]
cli
.
Flag
{
config
.
FormatFlag
},
Action
:
HyprlandCheckCommand
,
},
{
...
...
@@ -77,6 +78,7 @@ func CommandList() *cli.Command {
Name
:
"check"
,
Usage
:
locale
.
T
(
"Check Hyprland module"
),
ArgsUsage
:
"module"
,
Flags
:
[]
cli
.
Flag
{
config
.
FormatFlag
},
Action
:
HyprlandModuleCheckCommand
,
ShellComplete
:
ShellCompleteModule
(
"all"
),
},
...
...
hyprland/manager.go
View file @
725ccfc3
...
...
@@ -61,9 +61,9 @@ type HyprPlugin struct {
}
type
HyprConfigError
struct
{
File
string
Line
int
Text
string
File
string
`json:"file"`
Line
int
`json:"line"`
Text
string
`json:"text"`
}
func
NewHyprlandManager
()
(
*
HyprlandManager
,
error
)
{
...
...
@@ -1052,7 +1052,17 @@ func (m *HyprlandManager) parseCheckOutput(out []byte) []HyprConfigError {
})
}
return
res
// Дедупликация: Hyprland может дублировать ошибки из source-файлов
seen
:=
make
(
map
[
string
]
bool
)
deduped
:=
make
([]
HyprConfigError
,
0
,
len
(
res
))
for
_
,
e
:=
range
res
{
key
:=
fmt
.
Sprintf
(
"%s:%d:%s"
,
e
.
File
,
e
.
Line
,
e
.
Text
)
if
!
seen
[
key
]
{
seen
[
key
]
=
true
deduped
=
append
(
deduped
,
e
)
}
}
return
deduped
}
func
(
m
*
HyprlandManager
)
removeLine
(
lineNumber
int
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment