diff --git a/README.md b/README.md index e1c5e07..3b176aa 100644 --- a/README.md +++ b/README.md @@ -53,8 +53,8 @@ Example: ```shell $ publiccode-parser mypubliccode.yml mypubliccode.yml:36:1: error: developmentStatus: developmentStatus must be one of the following: "concept", "development", "beta", "stable" or "obsolete" -mypubliccode.yml:12:5: warning: description.en.genericName: This key is DEPRECATED and will be removed in the future. It's safe to drop it -mypubliccode.yml:48:3: warning: legal.authorsFile: This key is DEPRECATED and will be removed in the future. It's safe to drop it +mypubliccode.yml:12:5: warning: description.en.genericName: This key is DEPRECATED and will be removed in v1. It's safe to drop it +mypubliccode.yml:48:3: warning: legal.authorsFile: This key is DEPRECATED and will be removed in v1. It's safe to drop it ``` The argument can also be the URL of a remote `publiccode.yml`, so you can diff --git a/fields.go b/fields.go index 6ade2b4..6c0f7fd 100644 --- a/fields.go +++ b/fields.go @@ -93,7 +93,7 @@ func validateFieldsV0( //nolint:maintidx if publiccodev0.MonochromeLogo != nil && *publiccodev0.MonochromeLogo != "" { vr = append(vr, newValidationWarning( "monochromeLogo", - "This key is DEPRECATED and will be removed in the future. Use 'logo' instead", + "This key is DEPRECATED and will be removed in v1. Use 'logo' instead", )) if err := isRepositoryPathOrURL(*publiccodev0.MonochromeLogo, "monochromeLogo"); err != nil { @@ -129,7 +129,7 @@ func validateFieldsV0( //nolint:maintidx if scope == "government" { vr = append(vr, newValidationWarning( fmt.Sprintf("intendedAudience.scope[%d]", i), - "The 'government' scope is DEPRECATED and will be removed in the future. It's safe to drop it", + "The 'government' scope is DEPRECATED and will be removed in v1. It's safe to drop it", )) } } @@ -138,7 +138,7 @@ func validateFieldsV0( //nolint:maintidx if publiccodev0.IntendedAudience.UnsupportedCountries != nil { vr = append(vr, newValidationWarning( "intendedAudience.unsupportedCountries", - "This key is DEPRECATED and will be removed in the future. "+ + "This key is DEPRECATED and will be removed in v1. "+ "Use 'intendedAudience.countries' to list the targeted countries instead", )) @@ -171,7 +171,7 @@ func validateFieldsV0( //nolint:maintidx if publiccodev0.Legal.AuthorsFile != nil { vr = append(vr, newValidationWarning( "legal.authorsFile", - "This key is DEPRECATED and will be removed in the future. It's safe to drop it", + "This key is DEPRECATED and will be removed in v1. It's safe to drop it", )) if err := isRepositoryPathOrURL(*publiccodev0.Legal.AuthorsFile, "legal.authorsFile"); err != nil { @@ -192,35 +192,35 @@ func validateFieldsV0( //nolint:maintidx if publiccodev0.Legal.RepoOwner != nil { vr = append(vr, newValidationWarning( "legal.repoOwner", - "This key is DEPRECATED and will be removed in the future. Use 'organisation.name' instead", + "This key is DEPRECATED and will be removed in v1. Use 'organisation.name' instead", )) } if publiccodev0.InputTypes != nil { vr = append(vr, newValidationWarning( "inputTypes", - "This key is DEPRECATED and will be removed in the future. It's safe to drop it", + "This key is DEPRECATED and will be removed in v1. It's safe to drop it", )) } if publiccodev0.DependsOn != nil && publiccodev0.DependsOn.Open != nil { vr = append(vr, newValidationWarning( "dependsOn.open", - "This key is DEPRECATED and will be removed in the future. It's safe to drop it", + "This key is DEPRECATED and will be removed in v1. It's safe to drop it", )) } if publiccodev0.UsedBy != nil { vr = append(vr, newValidationWarning( "usedBy", - "This key is DEPRECATED and will be removed in the future. It's safe to drop it", + "This key is DEPRECATED and will be removed in v1. It's safe to drop it", )) } if publiccodev0.OutputTypes != nil { vr = append(vr, newValidationWarning( "outputTypes", - "This key is DEPRECATED and will be removed in the future. It's safe to drop it", + "This key is DEPRECATED and will be removed in v1. It's safe to drop it", )) } @@ -228,7 +228,7 @@ func validateFieldsV0( //nolint:maintidx if len(desc.GenericName) > 0 { vr = append(vr, newValidationWarning( fmt.Sprintf("description.%s.genericName", lang), - "This key is DEPRECATED and will be removed in the future. It's safe to drop it", + "This key is DEPRECATED and will be removed in v1. It's safe to drop it", )) } @@ -266,7 +266,7 @@ func validateFieldsV0( //nolint:maintidx if len(desc.Videos) > 0 { vr = append(vr, newValidationWarning( fmt.Sprintf("description.%s.videos", lang), - "This key is DEPRECATED and will be removed in the future. "+ + "This key is DEPRECATED and will be removed in v1. "+ "Link videos from the documentation or the website instead", )) } @@ -294,14 +294,14 @@ func validateFieldsV0( //nolint:maintidx if publiccodev0.IT != nil { vr = append(vr, newValidationWarning( "IT", - "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", + "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", )) } if publiccodev0.It != nil { vr = append(vr, newValidationWarning( "it", - "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", + "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", )) it = publiccodev0.It @@ -320,13 +320,13 @@ func validateFieldsV0( //nolint:maintidx if it.Conforme.GDPR != nil && *it.Conforme.GDPR { vr = append(vr, newValidationWarning( itKey+".conforme.gdpr", - "This key is DEPRECATED and will be removed in the future. "+ + "This key is DEPRECATED and will be removed in v1. "+ "Add a 'supports' entry with id 'alias:gdpr' instead", )) } else { vr = append(vr, newValidationWarning( itKey+".conforme", - "This key is DEPRECATED and will be removed in the future. It's safe to drop it", + "This key is DEPRECATED and will be removed in v1. It's safe to drop it", )) } } @@ -335,7 +335,7 @@ func validateFieldsV0( //nolint:maintidx if sharedValidate.Var(it.Riuso.CodiceIPA, "is_italian_ipa_code") == nil { vr = append(vr, newValidationWarningf( itKey+".riuso.codiceIPA", - "This key is DEPRECATED and will be removed in the future. "+ + "This key is DEPRECATED and will be removed in v1. "+ "Use 'organisation.uri' and set it to 'urn:x-italian-pa:%s' instead", it.Riuso.CodiceIPA, )) @@ -357,7 +357,7 @@ func validateFieldsV0( //nolint:maintidx if p.set { vr = append(vr, newValidationWarningf( itKey+".piattaforme."+p.key, - "This key is DEPRECATED and will be removed in the future. "+ + "This key is DEPRECATED and will be removed in v1. "+ "Add a 'supports' entry with id 'alias:%s' instead", p.key, )) diff --git a/parser.go b/parser.go index f8c0792..91c1d64 100644 --- a/parser.go +++ b/parser.go @@ -509,7 +509,7 @@ func (p *Parser) parseAndValidate( //nolint:maintidx ve = append(ve, ValidationWarning{ Key: "isBasedOn", - Description: "The single string form is DEPRECATED and will be removed in the future. " + + Description: "The single string form is DEPRECATED and will be removed in v1. " + "Use a one element array instead", Line: line, Column: column, diff --git a/v0_test.go b/v0_test.go index 4a3f070..528b1e1 100644 --- a/v0_test.go +++ b/v0_test.go @@ -15,8 +15,8 @@ func TestValidTestcasesV0_NoNetwork(t *testing.T) { func TestValidWithWarningTestcasesV0_NoNetwork(t *testing.T) { expected := map[string]error{ "authorsFile.yml": ValidationResults{ - ValidationWarning{File: "", Key: "legal.authorsFile", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 54, Column: 3}, - ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", Line: 86, Column: 1}, + ValidationWarning{File: "", Key: "legal.authorsFile", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 54, Column: 3}, + ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", Line: 86, Column: 1}, }, "license_deprecated.yml": ValidationResults{ ValidationWarning{Key: "legal.license", Description: "'GPL-3.0' is a DEPRECATED SPDX license identifier. Use 'GPL-3.0-only' or 'GPL-3.0-or-later' instead", Line: 39, Column: 3}, @@ -27,21 +27,21 @@ func TestValidWithWarningTestcasesV0_NoNetwork(t *testing.T) { ValidationWarning{Key: "legal.license", Description: "'eCos-2.0' is a DEPRECATED SPDX license identifier. Use its replacement from https://spdx.org/licenses instead", Line: 39, Column: 3}, }, "it_conforme_without_optional_fields.yml": ValidationResults{ - ValidationWarning{Key: "IT", Description: "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", Line: 52, Column: 1}, - ValidationWarning{Key: "IT.conforme.gdpr", Description: "This key is DEPRECATED and will be removed in the future. Add a 'supports' entry with id 'alias:gdpr' instead", Line: 54, Column: 5}, + ValidationWarning{Key: "IT", Description: "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", Line: 52, Column: 1}, + ValidationWarning{Key: "IT.conforme.gdpr", Description: "This key is DEPRECATED and will be removed in v1. Add a 'supports' entry with id 'alias:gdpr' instead", Line: 54, Column: 5}, }, "isBasedOn_tagged_string.yml": ValidationResults{ - ValidationWarning{Key: "isBasedOn", Description: "The single string form is DEPRECATED and will be removed in the future. Use a one element array instead", Line: 7, Column: 1}, + ValidationWarning{Key: "isBasedOn", Description: "The single string form is DEPRECATED and will be removed in v1. Use a one element array instead", Line: 7, Column: 1}, }, "IT_riuso_codiceIPA_with_legal_repoOwner.yml": ValidationResults{ - ValidationWarning{Key: "legal.repoOwner", Description: "This key is DEPRECATED and will be removed in the future. Use 'organisation.name' instead", Line: 40, Column: 3}, - ValidationWarning{Key: "IT", Description: "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", Line: 53, Column: 1}, - ValidationWarning{Key: "IT.riuso.codiceIPA", Description: "This key is DEPRECATED and will be removed in the future. Use 'organisation.uri' and set it to 'urn:x-italian-pa:pcm' instead", Line: 55, Column: 5}, + ValidationWarning{Key: "legal.repoOwner", Description: "This key is DEPRECATED and will be removed in v1. Use 'organisation.name' instead", Line: 40, Column: 3}, + ValidationWarning{Key: "IT", Description: "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", Line: 53, Column: 1}, + ValidationWarning{Key: "IT.riuso.codiceIPA", Description: "This key is DEPRECATED and will be removed in v1. Use 'organisation.uri' and set it to 'urn:x-italian-pa:pcm' instead", Line: 55, Column: 5}, }, "IT_riuso_codiceIPA_with_organisation.yml": ValidationResults{ - ValidationWarning{Key: "legal.repoOwner", Description: "This key is DEPRECATED and will be removed in the future. Use 'organisation.name' instead", Line: 44, Column: 3}, - ValidationWarning{Key: "IT", Description: "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", Line: 57, Column: 1}, - ValidationWarning{Key: "IT.riuso.codiceIPA", Description: "This key is DEPRECATED and will be removed in the future. Use 'organisation.uri' and set it to 'urn:x-italian-pa:pcm' instead", Line: 59, Column: 5}, + ValidationWarning{Key: "legal.repoOwner", Description: "This key is DEPRECATED and will be removed in v1. Use 'organisation.name' instead", Line: 44, Column: 3}, + ValidationWarning{Key: "IT", Description: "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", Line: 57, Column: 1}, + ValidationWarning{Key: "IT.riuso.codiceIPA", Description: "This key is DEPRECATED and will be removed in v1. Use 'organisation.uri' and set it to 'urn:x-italian-pa:pcm' instead", Line: 59, Column: 5}, }, } @@ -91,10 +91,10 @@ func TestInvalidTestcasesV0_NoNetwork(t *testing.T) { "landingURL_invalid.yml": ValidationResults{ // Just a syntax check here, no check for reachability as network is disabled ValidationError{File: "", Key: "landingURL", Description: "landingURL must be an HTTP URL", Line: 7, Column: 1}, - ValidationWarning{File: "", Key: "usedBy", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 16, Column: 1}, - ValidationWarning{File: "", Key: "description.en.videos", Description: "This key is DEPRECATED and will be removed in the future. Link videos from the documentation or the website instead", Line: 50, Column: 5}, - ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 90, Column: 3}, - ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", Line: 106, Column: 1}, + ValidationWarning{File: "", Key: "usedBy", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 16, Column: 1}, + ValidationWarning{File: "", Key: "description.en.videos", Description: "This key is DEPRECATED and will be removed in v1. Link videos from the documentation or the website instead", Line: 50, Column: 5}, + ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 90, Column: 3}, + ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", Line: 106, Column: 1}, }, // url, landingURL, isBasedOn and roadmap @@ -109,7 +109,7 @@ func TestInvalidTestcasesV0_NoNetwork(t *testing.T) { // monochromeLogo "monochromeLogo_invalid_png.yml": ValidationResults{ - ValidationWarning{File: "", Key: "monochromeLogo", Description: "This key is DEPRECATED and will be removed in the future. Use 'logo' instead", Line: 17, Column: 1}, + ValidationWarning{File: "", Key: "monochromeLogo", Description: "This key is DEPRECATED and will be removed in v1. Use 'logo' instead", Line: 17, Column: 1}, ValidationError{File: "", Key: "monochromeLogo", Description: "image: unknown format", Line: 17, Column: 1}, }, @@ -240,16 +240,16 @@ func TestInvalidTestcasesV0(t *testing.T) { // landingURL "landingURL_wrong_type.yml": ValidationResults{ ValidationError{File: "", Key: "landingURL", Description: "must be a string", Line: 7, Column: 1}, - ValidationWarning{File: "", Key: "usedBy", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 16, Column: 1}, - ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 86, Column: 3}, - ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", Line: 102, Column: 1}, + ValidationWarning{File: "", Key: "usedBy", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 16, Column: 1}, + ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 86, Column: 3}, + ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", Line: 102, Column: 1}, }, "landingURL_invalid.yml": ValidationResults{ ValidationError{File: "", Key: "landingURL", Description: "landingURL must be an HTTP URL", Line: 7, Column: 1}, - ValidationWarning{File: "", Key: "usedBy", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 16, Column: 1}, - ValidationWarning{File: "", Key: "description.en.videos", Description: "This key is DEPRECATED and will be removed in the future. Link videos from the documentation or the website instead", Line: 50, Column: 5}, - ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 90, Column: 3}, - ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", Line: 106, Column: 1}, + ValidationWarning{File: "", Key: "usedBy", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 16, Column: 1}, + ValidationWarning{File: "", Key: "description.en.videos", Description: "This key is DEPRECATED and will be removed in v1. Link videos from the documentation or the website instead", Line: 50, Column: 5}, + ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 90, Column: 3}, + ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", Line: 106, Column: 1}, }, // isBasedOn @@ -260,7 +260,7 @@ func TestInvalidTestcasesV0(t *testing.T) { ValidationError{File: "", Key: "isBasedOn[1]", Description: "isBasedOn[1] must be a valid URL", Line: 9, Column: 5}, }, "isBasedOn_bad_url_string.yml": ValidationResults{ - ValidationWarning{File: "", Key: "isBasedOn", Description: "The single string form is DEPRECATED and will be removed in the future. Use a one element array instead", Line: 7, Column: 1}, + ValidationWarning{File: "", Key: "isBasedOn", Description: "The single string form is DEPRECATED and will be removed in v1. Use a one element array instead", Line: 7, Column: 1}, ValidationError{File: "", Key: "isBasedOn[0]", Description: "isBasedOn[0] must be a valid URL", Line: 7, Column: 1}, }, @@ -331,15 +331,15 @@ func TestInvalidTestcasesV0(t *testing.T) { ValidationError{File: "", Key: "monochromeLogo", Description: "must be a string", Line: 17, Column: 1}, }, "monochromeLogo_unsupported_extension.yml": ValidationResults{ - ValidationWarning{File: "", Key: "monochromeLogo", Description: "This key is DEPRECATED and will be removed in the future. Use 'logo' instead", Line: 17, Column: 1}, + ValidationWarning{File: "", Key: "monochromeLogo", Description: "This key is DEPRECATED and will be removed in v1. Use 'logo' instead", Line: 17, Column: 1}, ValidationError{File: "", Key: "monochromeLogo", Description: "invalid file extension for: " + cwd + "/testdata/v0/invalid/monochromeLogo.mpg", Line: 17, Column: 1}, }, "monochromeLogo_missing_file.yml": ValidationResults{ - ValidationWarning{File: "", Key: "monochromeLogo", Description: "This key is DEPRECATED and will be removed in the future. Use 'logo' instead", Line: 17, Column: 1}, + ValidationWarning{File: "", Key: "monochromeLogo", Description: "This key is DEPRECATED and will be removed in v1. Use 'logo' instead", Line: 17, Column: 1}, ValidationError{File: "", Key: "monochromeLogo", Description: "no such file: " + cwd + "/testdata/v0/invalid/no_such_file.png", Line: 17, Column: 1}, }, "monochromeLogo_outside_repository.yml": ValidationResults{ - ValidationWarning{File: "", Key: "monochromeLogo", Description: "This key is DEPRECATED and will be removed in the future. Use 'logo' instead", Line: 17, Column: 1}, + ValidationWarning{File: "", Key: "monochromeLogo", Description: "This key is DEPRECATED and will be removed in v1. Use 'logo' instead", Line: 17, Column: 1}, ValidationError{File: "", Key: "monochromeLogo", Description: "refers to a file outside the repository", Line: 17, Column: 1}, }, @@ -366,7 +366,7 @@ func TestInvalidTestcasesV0(t *testing.T) { // inputTypes "inputTypes_invalid.yml": ValidationResults{ ValidationError{File: "", Key: "inputTypes[1]", Description: "inputTypes[1] is not a valid MIME type", Line: 15, Column: 7}, - ValidationWarning{File: "", Key: "inputTypes", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 13, Column: 1}, + ValidationWarning{File: "", Key: "inputTypes", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 13, Column: 1}, }, "inputTypes_wrong_type.yml": ValidationResults{ ValidationError{File: "", Key: "inputTypes", Description: "must be a list", Line: 13, Column: 1}, @@ -375,7 +375,7 @@ func TestInvalidTestcasesV0(t *testing.T) { // outputTypes "outputTypes_invalid.yml": ValidationResults{ ValidationError{File: "", Key: "outputTypes[1]", Description: "outputTypes[1] is not a valid MIME type", Line: 15, Column: 7}, - ValidationWarning{File: "", Key: "outputTypes", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 13, Column: 1}, + ValidationWarning{File: "", Key: "outputTypes", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 13, Column: 1}, }, "outputTypes_wrong_type.yml": ValidationResults{ ValidationError{File: "", Key: "outputTypes", Description: "must be a list", Line: 13, Column: 1}, @@ -459,7 +459,7 @@ func TestInvalidTestcasesV0(t *testing.T) { }, "intendedAudience_unsupportedCountries_invalid_country.yml": ValidationResults{ ValidationError{File: "", Key: "intendedAudience.unsupportedCountries[0]", Description: "unsupportedCountries[0] must be a valid ISO 3166-1 alpha-2 two-letter country code", Line: 19, Column: 7}, - ValidationWarning{File: "", Key: "intendedAudience.unsupportedCountries", Description: "This key is DEPRECATED and will be removed in the future. Use 'intendedAudience.countries' to list the targeted countries instead", Line: 17, Column: 3}, + ValidationWarning{File: "", Key: "intendedAudience.unsupportedCountries", Description: "This key is DEPRECATED and will be removed in v1. Use 'intendedAudience.countries' to list the targeted countries instead", Line: 17, Column: 3}, }, "intendedAudience_unsupportedCountries_wrong_type.yml": ValidationResults{ ValidationError{File: "", Key: "intendedAudience.unsupportedCountries", Description: "must be a list", Line: 18, Column: 3}, @@ -488,7 +488,7 @@ func TestInvalidTestcasesV0(t *testing.T) { }, "description_en_genericName_too_long.yml": ValidationResults{ ValidationError{File: "", Key: "description.en.genericName", Description: "genericName must be a maximum of 35 characters in length", Line: 20, Column: 5}, - ValidationWarning{File: "", Key: "description.en.genericName", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 20, Column: 5}, + ValidationWarning{File: "", Key: "description.en.genericName", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 20, Column: 5}, }, "description_en_shortDescription_missing.yml": ValidationResults{ ValidationError{File: "", Key: "description.en.shortDescription", Description: "shortDescription is a required field", Line: 18, Column: 5}, @@ -536,12 +536,12 @@ func TestInvalidTestcasesV0(t *testing.T) { ValidationError{File: "", Key: "description.en.videos[0]", Description: "videos[0] must be an HTTP URL", Line: 39, Column: 9}, ValidationError{File: "", Key: "description.en.videos[1]", Description: "videos[1] is a required field", Line: 41, Column: 8}, ValidationError{File: "", Key: "description.en.videos[2]", Description: "videos[2] must be an HTTP URL", Line: 43, Column: 9}, - ValidationWarning{File: "", Key: "description.en.videos", Description: "This key is DEPRECATED and will be removed in the future. Link videos from the documentation or the website instead", Line: 37, Column: 5}, + ValidationWarning{File: "", Key: "description.en.videos", Description: "This key is DEPRECATED and will be removed in v1. Link videos from the documentation or the website instead", Line: 37, Column: 5}, ValidationError{File: "", Key: "description.en.videos[0]", Description: "'ABC' is not a valid video URL supporting oEmbed: invalid oEmbed link: ABC", Line: 39, Column: 9}, ValidationError{File: "", Key: "description.en.videos[2]", Description: "'' is not a valid video URL supporting oEmbed: invalid oEmbed link: ", Line: 43, Column: 9}, }, "description_en_videos_invalid_oembed.yml": ValidationResults{ - ValidationWarning{File: "", Key: "description.en.videos", Description: "This key is DEPRECATED and will be removed in the future. Link videos from the documentation or the website instead", Line: 37, Column: 5}, + ValidationWarning{File: "", Key: "description.en.videos", Description: "This key is DEPRECATED and will be removed in v1. Link videos from the documentation or the website instead", Line: 37, Column: 5}, ValidationError{File: "", Key: "description.en.videos[0]", Description: "'https://google.com' is not a valid video URL supporting oEmbed: invalid oEmbed link: https://google.com", Line: 39, Column: 9}, }, @@ -556,15 +556,15 @@ func TestInvalidTestcasesV0(t *testing.T) { "legal_license_unbalanced_open.yml": ValidationResults{ValidationError{File: "", Key: "legal.license", Description: "license must be a valid license (see https://spdx.org/licenses)", Line: 40, Column: 3}}, "legal_license_unbalanced_trailing.yml": ValidationResults{ValidationError{File: "", Key: "legal.license", Description: "license must be a valid license (see https://spdx.org/licenses)", Line: 40, Column: 3}}, "legal_authorsFile_outside_repository.yml": ValidationResults{ - ValidationWarning{Key: "legal.authorsFile", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 40, Column: 3}, + ValidationWarning{Key: "legal.authorsFile", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 40, Column: 3}, ValidationError{Key: "legal.authorsFile", Description: "refers to a file outside the repository", Line: 40, Column: 3}, }, "legal_authorsFile_missing_file.yml": ValidationResults{ - ValidationWarning{File: "", Key: "legal.authorsFile", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 41, Column: 3}, + ValidationWarning{File: "", Key: "legal.authorsFile", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 41, Column: 3}, ValidationError{File: "", Key: "legal.authorsFile", Description: "'" + cwd + "/testdata/v0/invalid/no_such_authors_file.txt' does not exist: no such file: " + cwd + "/testdata/v0/invalid/no_such_authors_file.txt", Line: 41, Column: 3}, }, "legal_authorsFile_file_scheme_uppercase.yml": ValidationResults{ - ValidationWarning{File: "", Key: "legal.authorsFile", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 41, Column: 3}, + ValidationWarning{File: "", Key: "legal.authorsFile", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 41, Column: 3}, ValidationError{File: "", Key: "legal.authorsFile", Description: "is a file:// URL. Only relative paths or HTTP(s) URLs allowed", Line: 41, Column: 3}, }, @@ -651,47 +651,47 @@ func TestInvalidTestcasesV0(t *testing.T) { }, "dependsOn_open_name_wrong_type.yml": ValidationResults{ ValidationError{File: "", Key: "dependsOn.open[0].name", Description: "must be a string", Line: 55, Column: 7}, - ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 53, Column: 3}, + ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 53, Column: 3}, }, "dependsOn_open_versionMin_wrong_type.yml": ValidationResults{ ValidationError{File: "", Key: "dependsOn.open[0].versionMin", Description: "must be a string", Line: 56, Column: 7}, - ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 53, Column: 3}, + ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 53, Column: 3}, }, "dependsOn_open_versionMax_wrong_type.yml": ValidationResults{ ValidationError{File: "", Key: "dependsOn.open[0].versionMax", Description: "must be a string", Line: 56, Column: 7}, - ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 53, Column: 3}, + ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 53, Column: 3}, }, "dependsOn_open_version_wrong_type.yml": ValidationResults{ ValidationError{File: "", Key: "dependsOn.open[0].version", Description: "must be a string", Line: 56, Column: 7}, - ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 53, Column: 3}, + ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 53, Column: 3}, }, "dependsOn_open_optional_wrong_type.yml": ValidationResults{ ValidationError{File: "", Key: "dependsOn.open[0].optional", Description: "must be true or false", Line: 56, Column: 7}, - ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 53, Column: 3}, + ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 53, Column: 3}, }, // it.* "it_countryExtensionVersion_invalid.yml": ValidationResults{ ValidationError{File: "", Key: "IT.countryExtensionVersion", Description: "countryExtensionVersion must be one of the following: \"0.2\" or \"1.0\"", Line: 11, Column: 3}, - ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", Line: 10, Column: 1}, + ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", Line: 10, Column: 1}, }, "it_riuso_codiceIPA_invalid.yml": ValidationResults{ ValidationError{File: "", Key: "IT.riuso.codiceIPA", Description: "codiceIPA must be a valid Italian Public Administration Code (iPA) (see https://github.com/publiccodeyml/italian-organizations-ipa-vocabulary)", Line: 54, Column: 5}, - ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", Line: 52, Column: 1}, + ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", Line: 52, Column: 1}, }, "it_IT_duplicated.yml": ValidationResults{ - ValidationWarning{File: "", Key: "usedBy", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 13, Column: 1}, - ValidationWarning{File: "", Key: "description.en.videos", Description: "This key is DEPRECATED and will be removed in the future. Link videos from the documentation or the website instead", Line: 47, Column: 5}, - ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 72, Column: 3}, - ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", Line: 92, Column: 1}, - ValidationWarning{File: "", Key: "it", Description: "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", Line: 101, Column: 1}, + ValidationWarning{File: "", Key: "usedBy", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 13, Column: 1}, + ValidationWarning{File: "", Key: "description.en.videos", Description: "This key is DEPRECATED and will be removed in v1. Link videos from the documentation or the website instead", Line: 47, Column: 5}, + ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 72, Column: 3}, + ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", Line: 92, Column: 1}, + ValidationWarning{File: "", Key: "it", Description: "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", Line: 101, Column: 1}, ValidationError{File: "", Key: "it", Description: "'IT' key already present. Remove this key", Line: 101, Column: 1}, }, "it_wrong_case.yml": ValidationResults{ ValidationError{File: "", Key: "It", Description: "unknown field \"It\"", Line: 92, Column: 1}, - ValidationWarning{File: "", Key: "usedBy", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 13, Column: 1}, - ValidationWarning{File: "", Key: "description.en.videos", Description: "This key is DEPRECATED and will be removed in the future. Link videos from the documentation or the website instead", Line: 47, Column: 5}, - ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 72, Column: 3}, + ValidationWarning{File: "", Key: "usedBy", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 13, Column: 1}, + ValidationWarning{File: "", Key: "description.en.videos", Description: "This key is DEPRECATED and will be removed in v1. Link videos from the documentation or the website instead", Line: 47, Column: 5}, + ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 72, Column: 3}, }, "description_en_gb_invalid_bcp47.yml": ValidationResults{ ValidationError{File: "", Key: "description", Description: "description must be a valid BCP 47 language", Line: 16, Column: 1}, @@ -750,7 +750,7 @@ func TestInvalidTestcasesV0(t *testing.T) { }, "wrong_type_anchor.yml": ValidationResults{ ValidationError{File: "", Key: "localisation", Description: "must be a mapping", Line: 47, Column: 1}, - ValidationWarning{File: "", Key: "usedBy", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 52, Column: 1}, + ValidationWarning{File: "", Key: "usedBy", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 52, Column: 1}, }, "wrong_type_two_values.yml": ValidationResults{ ValidationError{File: "", Key: "name", Description: "must be a string", Line: 4, Column: 1}, @@ -786,7 +786,7 @@ func TestValidTestcasesV0(t *testing.T) { func TestValidWithWarningsTestcasesV0(t *testing.T) { expected := map[string]error{ "unicode_grapheme_clusters.yml": ValidationResults{ - ValidationWarning{File: "", Key: "description.en.genericName", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 21, Column: 5}, + ValidationWarning{File: "", Key: "description.en.genericName", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 21, Column: 5}, }, "maintenance_contacts_phone_not_e164.yml": ValidationResults{ ValidationWarning{File: "", Key: "maintenance.contacts[0].phone", Description: "Phone numbers SHOULD use the E.164 format, e.g. '+3923113215112'", Line: 46, Column: 7}, @@ -807,77 +807,77 @@ func TestValidWithWarningsTestcasesV0(t *testing.T) { ValidationWarning{File: "", Key: "publiccodeYmlVersion", Description: "v0.7 is not the latest version, use '0'. Parsing this file as v0.8.", Line: 1, Column: 1}, }, "valid.mime_types.yml": ValidationResults{ - ValidationWarning{File: "", Key: "inputTypes", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 47, Column: 1}, - ValidationWarning{File: "", Key: "outputTypes", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 49, Column: 1}, + ValidationWarning{File: "", Key: "inputTypes", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 47, Column: 1}, + ValidationWarning{File: "", Key: "outputTypes", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 49, Column: 1}, }, "valid_with_it_conforme_gdpr.yml": ValidationResults{ - ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", Line: 80, Column: 1}, - ValidationWarning{File: "", Key: "IT.conforme.gdpr", Description: "This key is DEPRECATED and will be removed in the future. Add a 'supports' entry with id 'alias:gdpr' instead", Line: 87, Column: 5}, + ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", Line: 80, Column: 1}, + ValidationWarning{File: "", Key: "IT.conforme.gdpr", Description: "This key is DEPRECATED and will be removed in v1. Add a 'supports' entry with id 'alias:gdpr' instead", Line: 87, Column: 5}, }, "valid_with_it_conforme_gdpr_false.yml": ValidationResults{ - ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", Line: 80, Column: 1}, - ValidationWarning{File: "", Key: "IT.conforme", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 82, Column: 3}, + ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", Line: 80, Column: 1}, + ValidationWarning{File: "", Key: "IT.conforme", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 82, Column: 3}, }, "valid_with_it_conforme.yml": ValidationResults{ - ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", Line: 80, Column: 1}, - ValidationWarning{File: "", Key: "IT.conforme", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 82, Column: 3}, + ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", Line: 80, Column: 1}, + ValidationWarning{File: "", Key: "IT.conforme", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 82, Column: 3}, }, "valid_with_country_specific_section_downcase.yml": ValidationResults{ - ValidationWarning{File: "", Key: "it", Description: "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", Line: 91, Column: 1}, + ValidationWarning{File: "", Key: "it", Description: "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", Line: 91, Column: 1}, }, "valid_with_it_downcase_deprecated_keys.yml": ValidationResults{ - ValidationWarning{Key: "it", Description: "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", Line: 91, Column: 1}, - ValidationWarning{Key: "it.conforme.gdpr", Description: "This key is DEPRECATED and will be removed in the future. Add a 'supports' entry with id 'alias:gdpr' instead", Line: 93, Column: 5}, - ValidationWarning{Key: "it.riuso.codiceIPA", Description: "This key is DEPRECATED and will be removed in the future. Use 'organisation.uri' and set it to 'urn:x-italian-pa:pcm' instead", Line: 96, Column: 5}, - ValidationWarning{Key: "it.piattaforme.spid", Description: "This key is DEPRECATED and will be removed in the future. Add a 'supports' entry with id 'alias:spid' instead", Line: 99, Column: 5}, + ValidationWarning{Key: "it", Description: "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", Line: 91, Column: 1}, + ValidationWarning{Key: "it.conforme.gdpr", Description: "This key is DEPRECATED and will be removed in v1. Add a 'supports' entry with id 'alias:gdpr' instead", Line: 93, Column: 5}, + ValidationWarning{Key: "it.riuso.codiceIPA", Description: "This key is DEPRECATED and will be removed in v1. Use 'organisation.uri' and set it to 'urn:x-italian-pa:pcm' instead", Line: 96, Column: 5}, + ValidationWarning{Key: "it.piattaforme.spid", Description: "This key is DEPRECATED and will be removed in v1. Add a 'supports' entry with id 'alias:spid' instead", Line: 99, Column: 5}, }, "valid_with_lowercase_countries.yml": ValidationResults{ ValidationWarning{File: "", Key: "intendedAudience.countries[0]", Description: "Lowercase country codes are DEPRECATED. Use uppercase instead ('IT')", Line: 27, Column: 7}, ValidationWarning{File: "", Key: "intendedAudience.countries[1]", Description: "Lowercase country codes are DEPRECATED. Use uppercase instead ('DE')", Line: 28, Column: 7}, - ValidationWarning{File: "", Key: "intendedAudience.unsupportedCountries", Description: "This key is DEPRECATED and will be removed in the future. Use 'intendedAudience.countries' to list the targeted countries instead", Line: 29, Column: 3}, + ValidationWarning{File: "", Key: "intendedAudience.unsupportedCountries", Description: "This key is DEPRECATED and will be removed in v1. Use 'intendedAudience.countries' to list the targeted countries instead", Line: 29, Column: 3}, ValidationWarning{File: "", Key: "intendedAudience.unsupportedCountries[0]", Description: "Lowercase country codes are DEPRECATED. Use uppercase instead ('US')", Line: 30, Column: 7}, }, "valid_with_government_scope.yml": ValidationResults{ - ValidationWarning{File: "", Key: "intendedAudience.scope[1]", Description: "The 'government' scope is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 19, Column: 7}, + ValidationWarning{File: "", Key: "intendedAudience.scope[1]", Description: "The 'government' scope is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 19, Column: 7}, }, "valid_with_unsupportedCountries.yml": ValidationResults{ - ValidationWarning{File: "", Key: "intendedAudience.unsupportedCountries", Description: "This key is DEPRECATED and will be removed in the future. Use 'intendedAudience.countries' to list the targeted countries instead", Line: 19, Column: 3}, + ValidationWarning{File: "", Key: "intendedAudience.unsupportedCountries", Description: "This key is DEPRECATED and will be removed in v1. Use 'intendedAudience.countries' to list the targeted countries instead", Line: 19, Column: 3}, }, "valid_with_isBasedOn_string.yml": ValidationResults{ - ValidationWarning{File: "", Key: "isBasedOn", Description: "The single string form is DEPRECATED and will be removed in the future. Use a one element array instead", Line: 6, Column: 1}, + ValidationWarning{File: "", Key: "isBasedOn", Description: "The single string form is DEPRECATED and will be removed in v1. Use a one element array instead", Line: 6, Column: 1}, }, "valid_with_legal_repoOwner.yml": ValidationResults{ - ValidationWarning{File: "", Key: "legal.repoOwner", Description: "This key is DEPRECATED and will be removed in the future. Use 'organisation.name' instead", Line: 50, Column: 3}, + ValidationWarning{File: "", Key: "legal.repoOwner", Description: "This key is DEPRECATED and will be removed in v1. Use 'organisation.name' instead", Line: 50, Column: 3}, }, "valid_with_usedBy.yml": ValidationResults{ - ValidationWarning{File: "", Key: "usedBy", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 12, Column: 1}, + ValidationWarning{File: "", Key: "usedBy", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 12, Column: 1}, }, "valid_with_dependsOn_open.yml": ValidationResults{ - ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 53, Column: 3}, + ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 53, Column: 3}, }, "valid_with_videos.yml": ValidationResults{ - ValidationWarning{File: "", Key: "description.en-GB.videos", Description: "This key is DEPRECATED and will be removed in the future. Link videos from the documentation or the website instead", Line: 37, Column: 5}, + ValidationWarning{File: "", Key: "description.en-GB.videos", Description: "This key is DEPRECATED and will be removed in v1. Link videos from the documentation or the website instead", Line: 37, Column: 5}, }, "valid_with_IT_piattaforme.yml": ValidationResults{ - ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", Line: 189, Column: 1}, - ValidationWarning{File: "", Key: "IT.piattaforme.spid", Description: "This key is DEPRECATED and will be removed in the future. Add a 'supports' entry with id 'alias:spid' instead", Line: 191, Column: 5}, - ValidationWarning{File: "", Key: "IT.piattaforme.pagopa", Description: "This key is DEPRECATED and will be removed in the future. Add a 'supports' entry with id 'alias:pagopa' instead", Line: 192, Column: 5}, - ValidationWarning{File: "", Key: "IT.piattaforme.cie", Description: "This key is DEPRECATED and will be removed in the future. Add a 'supports' entry with id 'alias:cie' instead", Line: 193, Column: 5}, - ValidationWarning{File: "", Key: "IT.piattaforme.anpr", Description: "This key is DEPRECATED and will be removed in the future. Add a 'supports' entry with id 'alias:anpr' instead", Line: 194, Column: 5}, - ValidationWarning{File: "", Key: "IT.piattaforme.io", Description: "This key is DEPRECATED and will be removed in the future. Add a 'supports' entry with id 'alias:io' instead", Line: 195, Column: 5}, + ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", Line: 189, Column: 1}, + ValidationWarning{File: "", Key: "IT.piattaforme.spid", Description: "This key is DEPRECATED and will be removed in v1. Add a 'supports' entry with id 'alias:spid' instead", Line: 191, Column: 5}, + ValidationWarning{File: "", Key: "IT.piattaforme.pagopa", Description: "This key is DEPRECATED and will be removed in v1. Add a 'supports' entry with id 'alias:pagopa' instead", Line: 192, Column: 5}, + ValidationWarning{File: "", Key: "IT.piattaforme.cie", Description: "This key is DEPRECATED and will be removed in v1. Add a 'supports' entry with id 'alias:cie' instead", Line: 193, Column: 5}, + ValidationWarning{File: "", Key: "IT.piattaforme.anpr", Description: "This key is DEPRECATED and will be removed in v1. Add a 'supports' entry with id 'alias:anpr' instead", Line: 194, Column: 5}, + ValidationWarning{File: "", Key: "IT.piattaforme.io", Description: "This key is DEPRECATED and will be removed in v1. Add a 'supports' entry with id 'alias:io' instead", Line: 195, Column: 5}, }, "valid_with_IT_riuso_codiceIPA.yml": ValidationResults{ - ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", Line: 101, Column: 1}, - ValidationWarning{File: "", Key: "IT.riuso.codiceIPA", Description: "This key is DEPRECATED and will be removed in the future. Use 'organisation.uri' and set it to 'urn:x-italian-pa:pcm' instead", Line: 103, Column: 5}, + ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", Line: 101, Column: 1}, + ValidationWarning{File: "", Key: "IT.riuso.codiceIPA", Description: "This key is DEPRECATED and will be removed in v1. Use 'organisation.uri' and set it to 'urn:x-italian-pa:pcm' instead", Line: 103, Column: 5}, }, "valid_with_country_specific_section_uppercase.yml": ValidationResults{ - ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", Line: 65, Column: 1}, + ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", Line: 65, Column: 1}, }, "countryExtensionVersion_1.0.yml": ValidationResults{ - ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", Line: 65, Column: 1}, + ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", Line: 65, Column: 1}, }, "valid_no_it_conforme.yml": ValidationResults{ - ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in the future. Migrate its keys as their warnings say, then drop it", Line: 65, Column: 1}, + ValidationWarning{File: "", Key: "IT", Description: "This key is DEPRECATED and will be removed in v1. Migrate its keys as their warnings say, then drop it", Line: 65, Column: 1}, }, } @@ -906,17 +906,17 @@ func TestDecodeValueErrorsRemote(t *testing.T) { // Pinned to a commit: fetching from main means a testdata change // breaks this test in every PR until the change itself lands. {"https://raw.githubusercontent.com/publiccodeyml/libpubliccode/389af926bcb5bcb723b56d8e390585f2d0f2c7e8/testdata/v0/valid_with_warnings/valid_with_lowercase_countries.yml", ValidationResults{ - ValidationWarning{File: "", Key: "isBasedOn", Description: "The single string form is DEPRECATED and will be removed in the future. Use a one element array instead", Line: 7, Column: 1}, - ValidationWarning{File: "", Key: "usedBy", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 18, Column: 1}, + ValidationWarning{File: "", Key: "isBasedOn", Description: "The single string form is DEPRECATED and will be removed in v1. Use a one element array instead", Line: 7, Column: 1}, + ValidationWarning{File: "", Key: "usedBy", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 18, Column: 1}, ValidationWarning{File: "", Key: "intendedAudience.countries[0]", Description: "Lowercase country codes are DEPRECATED. Use uppercase instead ('IT')", Line: 31, Column: 7}, ValidationWarning{File: "", Key: "intendedAudience.countries[1]", Description: "Lowercase country codes are DEPRECATED. Use uppercase instead ('DE')", Line: 32, Column: 7}, - ValidationWarning{File: "", Key: "intendedAudience.unsupportedCountries", Description: "This key is DEPRECATED and will be removed in the future. Use 'intendedAudience.countries' to list the targeted countries instead", Line: 33, Column: 3}, + ValidationWarning{File: "", Key: "intendedAudience.unsupportedCountries", Description: "This key is DEPRECATED and will be removed in v1. Use 'intendedAudience.countries' to list the targeted countries instead", Line: 33, Column: 3}, ValidationWarning{File: "", Key: "intendedAudience.unsupportedCountries[0]", Description: "Lowercase country codes are DEPRECATED. Use uppercase instead ('US')", Line: 34, Column: 7}, - ValidationWarning{File: "", Key: "description.en.videos", Description: "This key is DEPRECATED and will be removed in the future. Link videos from the documentation or the website instead", Line: 62, Column: 5}, + ValidationWarning{File: "", Key: "description.en.videos", Description: "This key is DEPRECATED and will be removed in v1. Link videos from the documentation or the website instead", Line: 62, Column: 5}, ValidationWarning{File: "", Key: "maintenance.contacts[0].phone", Description: "Phone numbers SHOULD use the E.164 format, e.g. '+3923113215112'", Line: 83, Column: 7}, ValidationWarning{File: "", Key: "maintenance.contacts[1].phone", Description: "Phone numbers SHOULD use the E.164 format, e.g. '+3923113215112'", Line: 87, Column: 7}, ValidationWarning{File: "", Key: "maintenance.contacts[2].phone", Description: "Phone numbers SHOULD use the E.164 format, e.g. '+3923113215112'", Line: 91, Column: 7}, - ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in the future. It's safe to drop it", Line: 102, Column: 3}, + ValidationWarning{File: "", Key: "dependsOn.open", Description: "This key is DEPRECATED and will be removed in v1. It's safe to drop it", Line: 102, Column: 3}, }}, }