Skip to content

Commit 8185df6

Browse files
committed
fix: reorder top level Config fields
1 parent 994d30c commit 8185df6

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

cmd/osv-scanner/scan/source/__snapshots__/command_test.snap

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5904,13 +5904,13 @@ id = "GHSA-whgm-jr23-g3j9"
59045904
---
59055905

59065906
[TestCommand_UpdateConfigIgnores_All/deep - 7]
5907-
[[IgnoredVulns]]
5908-
id = "GHSA-whgm-jr23-g3j9"
5909-
59105907
[[PackageOverrides]]
59115908
name = "ajv"
59125909
ignore = true
59135910

5911+
[[IgnoredVulns]]
5912+
id = "GHSA-whgm-jr23-g3j9"
5913+
59145914
---
59155915

59165916
[TestCommand_UpdateConfigIgnores_All/deep - 8]
@@ -6060,13 +6060,13 @@ id = "GHSA-2g4f-4pwh-qvx6"
60606060
---
60616061

60626062
[TestCommand_UpdateConfigIgnores_All/deep_with_no_configs - 7]
6063-
[[IgnoredVulns]]
6064-
id = "GHSA-whgm-jr23-g3j9"
6065-
60666063
[[PackageOverrides]]
60676064
name = "ajv"
60686065
ignore = true
60696066

6067+
[[IgnoredVulns]]
6068+
id = "GHSA-whgm-jr23-g3j9"
6069+
60706070
---
60716071

60726072
[TestCommand_UpdateConfigIgnores_All/deep_with_no_configs - 8]
@@ -6276,13 +6276,13 @@ id = "GHSA-whgm-jr23-g3j9"
62766276
---
62776277

62786278
[TestCommand_UpdateConfigIgnores_All/deep_with_removed_config - 7]
6279-
[[IgnoredVulns]]
6280-
id = "GHSA-whgm-jr23-g3j9"
6281-
62826279
[[PackageOverrides]]
62836280
name = "ajv"
62846281
ignore = true
62856282

6283+
[[IgnoredVulns]]
6284+
id = "GHSA-whgm-jr23-g3j9"
6285+
62866286
---
62876287

62886288
[TestCommand_UpdateConfigIgnores_All/deep_with_removed_config - 8]

internal/config/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ import (
1616
var OSVScannerConfigName = "osv-scanner.toml"
1717

1818
type Config struct {
19-
IgnoredVulns []*IgnoreEntry `toml:"IgnoredVulns,omitempty"`
20-
PackageOverrides []PackageOverrideEntry `toml:"PackageOverrides,omitempty"`
2119
GoVersionOverride string `toml:"GoVersionOverride,omitempty"`
20+
PackageOverrides []PackageOverrideEntry `toml:"PackageOverrides,omitempty"`
21+
IgnoredVulns []*IgnoreEntry `toml:"IgnoredVulns,omitempty"`
2222
// The path to config file that this config was loaded from,
2323
// set by the scanner after having successfully parsed the file
2424
LoadPath string `toml:"-"`

0 commit comments

Comments
 (0)