Skip to content

Commit d93c904

Browse files
authored
Merge pull request #252 from arduino/dependabot/go_modules/github.com/arduino/go-paths-helper-1.6.1
Bump github.com/arduino/go-paths-helper from 1.4.0 to 1.6.1
2 parents 7374379 + 26b7c9d commit d93c904

File tree

8 files changed

+34
-13
lines changed

8 files changed

+34
-13
lines changed

Diff for: docsgen/go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ github.com/arduino/board-discovery v0.0.0-20180823133458-1ba29327fb0c/go.mod h1:
5252
github.com/arduino/go-paths-helper v1.0.1/go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck=
5353
github.com/arduino/go-paths-helper v1.2.0/go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck=
5454
github.com/arduino/go-paths-helper v1.3.2/go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck=
55-
github.com/arduino/go-paths-helper v1.4.0 h1:ilnseAdxmN1bFnLxxXHRtcdmt9jBf3O4jtYfWfqule4=
56-
github.com/arduino/go-paths-helper v1.4.0/go.mod h1:V82BWgAAp4IbmlybxQdk9Bpkz8M4Qyx+RAFKaG9NuvU=
55+
github.com/arduino/go-paths-helper v1.6.1 h1:lha+/BuuBsx0qTZ3gy6IO1kU23lObWdQ/UItkzVWQ+0=
56+
github.com/arduino/go-paths-helper v1.6.1/go.mod h1:V82BWgAAp4IbmlybxQdk9Bpkz8M4Qyx+RAFKaG9NuvU=
5757
github.com/arduino/go-properties-orderedmap v1.3.0/go.mod h1:DKjD2VXY/NZmlingh4lSFMEYCVubfeArCsGPGDwb2yk=
5858
github.com/arduino/go-properties-orderedmap v1.6.0 h1:gp2JoWRETtqwsZ+UHu/PBuYWYH2x2+d+uipDxS4WmvM=
5959
github.com/arduino/go-properties-orderedmap v1.6.0/go.mod h1:DKjD2VXY/NZmlingh4lSFMEYCVubfeArCsGPGDwb2yk=

Diff for: go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ require (
88
github.com/OneOfOne/xxhash v1.2.8 // indirect
99
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect
1010
github.com/arduino/arduino-cli v0.0.0-20201210103408-bf7a3194bb63
11-
github.com/arduino/go-paths-helper v1.4.0
11+
github.com/arduino/go-paths-helper v1.6.1
1212
github.com/arduino/go-properties-orderedmap v1.6.0
1313
github.com/client9/misspell v0.3.4
1414
github.com/daaku/go.zipexe v1.0.1 // indirect

Diff for: go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ github.com/arduino/board-discovery v0.0.0-20180823133458-1ba29327fb0c/go.mod h1:
5252
github.com/arduino/go-paths-helper v1.0.1/go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck=
5353
github.com/arduino/go-paths-helper v1.2.0/go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck=
5454
github.com/arduino/go-paths-helper v1.3.2/go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck=
55-
github.com/arduino/go-paths-helper v1.4.0 h1:ilnseAdxmN1bFnLxxXHRtcdmt9jBf3O4jtYfWfqule4=
56-
github.com/arduino/go-paths-helper v1.4.0/go.mod h1:V82BWgAAp4IbmlybxQdk9Bpkz8M4Qyx+RAFKaG9NuvU=
55+
github.com/arduino/go-paths-helper v1.6.1 h1:lha+/BuuBsx0qTZ3gy6IO1kU23lObWdQ/UItkzVWQ+0=
56+
github.com/arduino/go-paths-helper v1.6.1/go.mod h1:V82BWgAAp4IbmlybxQdk9Bpkz8M4Qyx+RAFKaG9NuvU=
5757
github.com/arduino/go-properties-orderedmap v1.3.0/go.mod h1:DKjD2VXY/NZmlingh4lSFMEYCVubfeArCsGPGDwb2yk=
5858
github.com/arduino/go-properties-orderedmap v1.6.0 h1:gp2JoWRETtqwsZ+UHu/PBuYWYH2x2+d+uipDxS4WmvM=
5959
github.com/arduino/go-properties-orderedmap v1.6.0/go.mod h1:DKjD2VXY/NZmlingh4lSFMEYCVubfeArCsGPGDwb2yk=

Diff for: internal/rule/rulefunction/library.go

+19-8
Original file line numberDiff line numberDiff line change
@@ -1456,17 +1456,28 @@ func LibraryHasStraySketches() (result ruleresult.Type, output string) {
14561456
func MissingExamples() (result ruleresult.Type, output string) {
14571457
for _, examplesFolderName := range library.ExamplesFolderSupportedNames() {
14581458
examplesPath := projectdata.ProjectPath().Join(examplesFolderName)
1459-
exists, err := examplesPath.IsDirCheck()
1459+
1460+
exists, err := examplesPath.ExistCheck()
14601461
if err != nil {
14611462
panic(err)
14621463
}
1463-
if exists {
1464-
directoryListing, _ := examplesPath.ReadDirRecursive()
1465-
directoryListing.FilterDirs()
1466-
for _, potentialExamplePath := range directoryListing {
1467-
if sketch.ContainsMainSketchFile(potentialExamplePath) {
1468-
return ruleresult.Pass, ""
1469-
}
1464+
if !exists {
1465+
continue
1466+
}
1467+
1468+
isDir, err := examplesPath.IsDirCheck()
1469+
if err != nil {
1470+
panic(err)
1471+
}
1472+
if !isDir {
1473+
continue
1474+
}
1475+
1476+
directoryListing, _ := examplesPath.ReadDirRecursive()
1477+
directoryListing.FilterDirs()
1478+
for _, potentialExamplePath := range directoryListing {
1479+
if sketch.ContainsMainSketchFile(potentialExamplePath) {
1480+
return ruleresult.Pass, ""
14701481
}
14711482
}
14721483
}

Diff for: internal/rule/rulefunction/library_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,7 @@ func TestLibraryHasStraySketches(t *testing.T) {
952952

953953
func TestMissingExamples(t *testing.T) {
954954
testTables := []libraryRuleFunctionTestTable{
955+
{"File name collision", "ExamplesFile", ruleresult.Fail, ""},
955956
{"Has examples", "ExamplesFolder", ruleresult.Pass, ""},
956957
{`Has examples (in "example" folder)`, "ExampleFolder", ruleresult.Pass, ""},
957958
{"No examples", "NoExamples", ruleresult.Fail, ""},

Diff for: internal/rule/rulefunction/testdata/libraries/ExamplesFile/examples

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name=ExamplesFolder
2+
version=1.0.0
3+
author=Cristian Maglie <[email protected]>, Pippo Pluto <[email protected]>
4+
maintainer=Cristian Maglie <[email protected]>
5+
sentence=A library that makes coding a web server a breeze.
6+
paragraph=Supports HTTP1.1 and you can do GET and POST.
7+
category=Communication
8+
url=http://example.com/
9+
architectures=avr

Diff for: internal/rule/rulefunction/testdata/libraries/ExamplesFile/src/ExamplesFolder.h

Whitespace-only changes.

0 commit comments

Comments
 (0)