Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

‎docsgen/go.sum‎

Lines changed: 2 additions & 2 deletions
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=

‎go.mod‎

Lines changed: 1 addition & 1 deletion
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

‎go.sum‎

Lines changed: 2 additions & 2 deletions
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=

‎internal/rule/rulefunction/library.go‎

Lines changed: 19 additions & 8 deletions
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
}

‎internal/rule/rulefunction/library_test.go‎

Lines changed: 1 addition & 0 deletions
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, ""},

‎internal/rule/rulefunction/testdata/libraries/ExamplesFile/examples‎

Whitespace-only changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name=ExamplesFolder
2+
version=1.0.0
3+
author=Cristian Maglie <c.maglie@example.com>, Pippo Pluto <pippo@example.com>
4+
maintainer=Cristian Maglie <c.maglie@example.com>
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

‎internal/rule/rulefunction/testdata/libraries/ExamplesFile/src/ExamplesFolder.h‎

Whitespace-only changes.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /