Skip to content

Commit 27065e5

Browse files
authored
Remove invalid output file warning (#42)
Signed-off-by: Matt Rutkowski <[email protected]>
1 parent aafbf3c commit 27065e5

File tree

4 files changed

+3
-2742
lines changed

4 files changed

+3
-2742
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ This example uses the `--format` flag on the `schema` command to output in markd
176176
```md
177177
|name|format|version|variant|file (local)|url (remote)|
178178
|:--|:--|:--|:--|:--|:--|
179-
|CycloneDX v1.5 (development)|CycloneDX|1.5|development|schema/cyclonedx/1.5/bom-1.5-dev.schema.json|https://raw.githubusercontent.com/CycloneDX/specification/v1.5-dev/schema/bom-1.5.schema.json|
179+
|CycloneDX v1.5|CycloneDX|1.5|(latest)|schema/cyclonedx/1.5/bom-1.5.schema.json|https://raw.githubusercontent.com/CycloneDX/specification/master/schema/bom-1.5.schema.json|
180180
|CycloneDX v1.4|CycloneDX|1.4|(latest)|schema/cyclonedx/1.4/bom-1.4.schema.json|https://raw.githubusercontent.com/CycloneDX/specification/master/schema/bom-1.4.schema.json|
181181
|CycloneDX/specification/master/schema/bom-1.3-strict.schema.json|
182182
|CycloneDX v1.3|CycloneDX|1.3|(latest)|schema/cyclonedx/1.3/bom-1.3.schema.json|https://raw.githubusercontent.com/CycloneDX/specification/master/schema/bom-1.3.schema.json|
@@ -203,7 +203,7 @@ This example shows the `--quiet` flag being used on the `schema` command to turn
203203
```bash
204204
name format version variant file (local) url (remote)
205205
---- ------ ------- ------- ------------ ------------
206-
CycloneDX v1.5 (development) CycloneDX 1.5 development schema/cyclonedx/1.5/bom-1.5-dev.schema.json https://raw.githubusercontent.com/CycloneDX/specification/v1.5-dev/schema/bom-1.5.schema.json
206+
CycloneDX v1.5 CycloneDX 1.5 (latest) schema/cyclonedx/1.5/bom-1.5.schema.json https://raw.githubusercontent.com/CycloneDX/specification/master/schema/bom-1.5.schema.json
207207
CycloneDX v1.4 CycloneDX 1.4 (latest) schema/cyclonedx/1.4/bom-1.4.schema.json https://raw.githubusercontent.com/CycloneDX/specification/master/schema/bom-1.4.schema.json
208208
CycloneDX v1.3 CycloneDX 1.3 (latest) schema/cyclonedx/1.3/bom-1.3.schema.json https://raw.githubusercontent.com/CycloneDX/specification/master/schema/bom-1.3.schema.json
209209
CycloneDX v1.2 CycloneDX 1.2 (latest) schema/cyclonedx/1.2/bom-1.2.schema.json https://raw.githubusercontent.com/CycloneDX/specification/master/schema/bom-1.2.schema.json
@@ -215,7 +215,7 @@ SPDX v2.2.1 SPDX SPDX-2.2 2.2.1 schema/spdx/2.2.
215215

216216
#### Output flag
217217

218-
All `list` subcommands support the `--output-file <filename>` flag (or its short-form `-o <filename>`) to send formatted output to a file.
218+
All `list` subcommands and the `validate` command support the `--output-file <filename>` flag (or its short-form `-o <filename>`) to send formatted output to a file.
219219

220220
##### Example: `--output-file` flag
221221

cmd/validate.go

-7
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,6 @@ func NewCommandValidate() *cobra.Command {
8080
command.Flags().StringVarP(&utils.GlobalFlags.PersistentFlags.OutputFormat, FLAG_FILE_OUTPUT_FORMAT, "", "",
8181
MSG_VALIDATE_FLAG_ERR_FORMAT+VALIDATE_SUPPORTED_ERROR_FORMATS)
8282
command.PreRunE = func(cmd *cobra.Command, args []string) error {
83-
84-
// This command can be called with this persistent flag, but does not make sense...
85-
inputFile := utils.GlobalFlags.PersistentFlags.InputFile
86-
if inputFile != "" {
87-
getLogger().Warningf("Invalid flag for command: `%s` (`%s`). Ignoring...", FLAG_FILENAME_OUTPUT, FLAG_FILENAME_OUTPUT_SHORT)
88-
}
89-
9083
return preRunTestForInputFile(cmd, args)
9184
}
9285
initCommandValidateFlags(command)

config.json

-9
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,6 @@
9595
"url": "https://raw.githubusercontent.com/CycloneDX/specification/master/schema/bom-1.4.schema.json",
9696
"default": true
9797
},
98-
{
99-
"version": "1.5",
100-
"variant": "development",
101-
"name": "CycloneDX v1.5 (development)",
102-
"file": "schema/cyclonedx/1.5/bom-1.5-dev.schema.json",
103-
"development": "https://github.com/CycloneDX/specification/blob/v1.5-dev/schema/bom-1.5.schema.json",
104-
"url": "https://raw.githubusercontent.com/CycloneDX/specification/v1.5-dev/schema/bom-1.5.schema.json",
105-
"default": false
106-
},
10798
{
10899
"version": "1.5",
109100
"variant": "",

0 commit comments

Comments
 (0)