Skip to content

Commit 57264ce

Browse files
committed
wip
1 parent b30e1b9 commit 57264ce

File tree

5 files changed

+5
-20
lines changed

5 files changed

+5
-20
lines changed

parser_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ func TestInvalidTestcasesV0_3(t *testing.T) {
339339
"description_eng_screenshots_missing_file.yml": ValidationResults{
340340
ValidationError{
341341
"description.eng.screenshots[0]",
342-
fmt.Sprintf("'no_such_file.png' is not an image: no such file : %s/no_such_file.png", cwd),
342+
"'no_such_file.png' is not an image: no such file : https://raw.githubusercontent.com/italia/developers.italia.it/main/no_such_file.png",
343343
20,
344344
5,
345345
},
@@ -369,7 +369,7 @@ func TestInvalidTestcasesV0_3(t *testing.T) {
369369
"legal_authorsFile_missing_file.yml": ValidationResults{
370370
ValidationError{
371371
"legal.authorsFile",
372-
fmt.Sprintf("'%s/no_such_authors_file.txt' does not exist", cwd),
372+
"'https://raw.githubusercontent.com/italia/developers.italia.it/main/no_such_authors_file.txt' does not exist",
373373
42,
374374
3,
375375
},

testdata/v0.3/invalid/landingURL_invalid.yml

-5
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@ description:
6161
- Will run without a problem
6262
- Has zero bugs
6363
- Solves all the problems of the world
64-
screenshots:
65-
- testdata/img/sshot1.png
66-
- testdata/img/sshot2.png
67-
- testdata/img/sshot3.png
6864
videos: # Demo videos of the software
6965
- https://www.youtube.com/watch?v=RaHmGbBOP84
7066
awards:
@@ -74,7 +70,6 @@ legal:
7470
license: AGPL-3.0-or-later # SPDX expression of license
7571
mainCopyrightOwner: City of Chicago
7672
repoOwner: City of Chicago
77-
authorsFile: testdata/AUTHORS # file listing copyright information
7873

7974
maintenance:
8075
type: "contract"

testdata/v0.3/invalid/landingURL_wrong_type.yml

-10
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ landingURL: []
1010
isBasedOn: "https://github.com/italia/developers.italia.it.git"
1111
softwareVersion: "1.0"
1212
releaseDate: 2017-04-15
13-
logo: testdata/img/logo.png
1413

1514
platforms:
1615
- android
@@ -62,20 +61,11 @@ description:
6261
- Will run without a problem
6362
- Has zero bugs
6463
- Solves all the problems of the world
65-
screenshots:
66-
- testdata/img/sshot1.png
67-
- testdata/img/sshot2.png
68-
- testdata/img/sshot3.png
69-
videos: # Demo videos of the software
70-
- https://www.youtube.com/watch?v=RaHmGbBOP84
71-
awards:
72-
- 1st Price Software of the year
7364

7465
legal:
7566
license: AGPL-3.0-or-later # SPDX expression of license
7667
mainCopyrightOwner: City of Chicago
7768
repoOwner: City of Chicago
78-
authorsFile: testdata/AUTHORS # file listing copyright information
7969

8070
maintenance:
8171
type: "contract"

v0.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ type DependencyV0 struct {
118118
// the two-letter lowercase ISO 3166-1 alpha-2 country code.
119119

120120
type ITSectionV0 struct {
121-
CountryExtensionVersion string `yaml:"countryExtensionVersion" validate:"eq=1.0"`
121+
CountryExtensionVersion string `yaml:"countryExtensionVersion"`
122122

123123
Conforme struct {
124124
LineeGuidaDesign bool `yaml:"lineeGuidaDesign,omitempty"`

validations.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func getHeaderFromDomain(domain Domain, url string) map[string]string {
6767
func (p *Parser) isReachable(u url.URL, network bool) (bool, error) {
6868
// Don't check if the network checks are disabled or if we are running in WASM
6969
// because we'd most likely fail due to CORS errors.
70-
if network || runtime.GOARCH == "wasm" {
70+
if !network || runtime.GOARCH == "wasm" {
7171
return true, nil
7272
}
7373

@@ -101,7 +101,7 @@ func toCodeHostingURL(file string, baseURL *url.URL) url.URL {
101101
return *uri
102102
}
103103

104-
// p.baseURL can be nil if we didn't autodetect it because
104+
// baseURL can be nil if we didn't autodetect it because
105105
// of DisableNetwork == true.
106106
if (baseURL != nil) {
107107
// If file is a relative path, let's just append it to our baseURL

0 commit comments

Comments
 (0)