Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 17 additions & 17 deletions fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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",
))
}
}
Expand All @@ -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",
))

Expand Down Expand Up @@ -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 {
Expand All @@ -192,43 +192,43 @@ 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",
))
}

for lang, desc := range publiccodev0.Description {
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",
))
}

Expand Down Expand Up @@ -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",
))
}
Expand Down Expand Up @@ -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
Expand All @@ -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",
))
}
}
Expand All @@ -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,
))
Expand All @@ -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,
))
Expand Down
2 changes: 1 addition & 1 deletion parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading