Skip to content

Commit 7e4942a

Browse files
committed
fix: reorder top level Config fields
1 parent 7641656 commit 7e4942a

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
@@ -6013,13 +6013,13 @@ id = "GHSA-whgm-jr23-g3j9"
60136013
---
60146014

60156015
[TestCommand_UpdateConfigIgnores_All/deep - 7]
6016-
[[IgnoredVulns]]
6017-
id = "GHSA-whgm-jr23-g3j9"
6018-
60196016
[[PackageOverrides]]
60206017
name = "ajv"
60216018
ignore = true
60226019

6020+
[[IgnoredVulns]]
6021+
id = "GHSA-whgm-jr23-g3j9"
6022+
60236023
---
60246024

60256025
[TestCommand_UpdateConfigIgnores_All/deep - 8]
@@ -6171,13 +6171,13 @@ id = "GHSA-2g4f-4pwh-qvx6"
61716171
---
61726172

61736173
[TestCommand_UpdateConfigIgnores_All/deep_with_no_configs - 7]
6174-
[[IgnoredVulns]]
6175-
id = "GHSA-whgm-jr23-g3j9"
6176-
61776174
[[PackageOverrides]]
61786175
name = "ajv"
61796176
ignore = true
61806177

6178+
[[IgnoredVulns]]
6179+
id = "GHSA-whgm-jr23-g3j9"
6180+
61816181
---
61826182

61836183
[TestCommand_UpdateConfigIgnores_All/deep_with_no_configs - 8]
@@ -6389,13 +6389,13 @@ id = "GHSA-whgm-jr23-g3j9"
63896389
---
63906390

63916391
[TestCommand_UpdateConfigIgnores_All/deep_with_removed_config - 7]
6392-
[[IgnoredVulns]]
6393-
id = "GHSA-whgm-jr23-g3j9"
6394-
63956392
[[PackageOverrides]]
63966393
name = "ajv"
63976394
ignore = true
63986395

6396+
[[IgnoredVulns]]
6397+
id = "GHSA-whgm-jr23-g3j9"
6398+
63996399
---
64006400

64016401
[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
@@ -17,9 +17,9 @@ import (
1717
var OSVScannerConfigName = "osv-scanner.toml"
1818

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

0 commit comments

Comments
 (0)