aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/subsystem/linux/subsystems.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2023-02-10 11:14:17 +0100
committerAleksandr Nogikh <wp32pw@gmail.com>2023-02-10 14:34:44 +0100
commit0241baba08ba2fd732e46a9634434154d58092e3 (patch)
tree1095c9b1ef242c6e1715f5e75818b5879a830db3 /pkg/subsystem/linux/subsystems.go
parentd9997523a37a026098016ff4f0ecddfcf5c0d4b4 (diff)
pkg/subsystem: extract names after all preprocessing
In the previous steps we eliminate some of the extracted subsystems. It helps to have fewer contention while assigning the names. As a result, we need to only rely on emails during parents trasnformations.
Diffstat (limited to 'pkg/subsystem/linux/subsystems.go')
-rw-r--r--pkg/subsystem/linux/subsystems.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/subsystem/linux/subsystems.go b/pkg/subsystem/linux/subsystems.go
index 8c7d1a673..5ca57a1be 100644
--- a/pkg/subsystem/linux/subsystems.go
+++ b/pkg/subsystem/linux/subsystems.go
@@ -31,10 +31,6 @@ func listFromRepoInner(root fs.FS, rules *customRules) ([]*entity.Subsystem, err
extraRules: rules,
}
list := ctx.groupByList()
- if err := setSubsystemNames(list); err != nil {
- return nil, fmt.Errorf("failed to set names: %w", err)
- }
- ctx.applyExtraRules(list)
matrix, err := match.BuildCoincidenceMatrix(root, list, dropPatterns)
if err != nil {
return nil, err
@@ -43,6 +39,10 @@ func listFromRepoInner(root fs.FS, rules *customRules) ([]*entity.Subsystem, err
if err != nil {
return nil, err
}
+ if err := setSubsystemNames(list); err != nil {
+ return nil, fmt.Errorf("failed to set names: %w", err)
+ }
+ ctx.applyExtraRules(list)
// Sort subsystems by name to keep output consistent.
sort.Slice(list, func(i, j int) bool { return list[i].Name < list[j].Name })