A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/arduino/arduino-cli/commit/63bfd5c5fcf9c714c3dc8c61e33884839b96ccbc below:

improved error messages parsing (#2782) · arduino/arduino-cli@63bfd5c · GitHub

File tree Expand file treeCollapse file tree 2 files changed

+11

-2

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+11

-2

lines changed Original file line number Diff line number Diff line change

@@ -477,8 +477,7 @@ func (l *SketchLibrariesDetector) failIfImportedLibraryIsWrong() error {

477 477

return nil

478 478

}

479 479 480 -

// includeRegexp fixdoc

481 -

var includeRegexp = regexp.MustCompile("(?ms)^\\s*#[ \t]*include\\s*[<\"](\\S+)[\">]")

480 +

var includeRegexp = regexp.MustCompile(`(?ms)^\s*[0-9 |]*\s*#[ \t]*include\s*[<"](\S+)[">]`)

482 481 483 482

// IncludesFinderWithRegExp fixdoc

484 483

func IncludesFinderWithRegExp(source string) string {

Original file line number Diff line number Diff line change

@@ -75,3 +75,13 @@ func TestIncludesFinderWithRegExpPaddedIncludes4(t *testing.T) {

75 75 76 76

require.Equal(t, "register.h", include)

77 77

}

78 + 79 +

func TestIncludesFinderWithRegExpPaddedIncludes5(t *testing.T) {

80 +

output := "/some/path/sketch.ino:23:42: fatal error: 'Foobar.h' file not found\n" +

81 +

" 23 | #include \"Foobar.h\"\n" +

82 +

" | ^~~~~~~~~~\n"

83 + 84 +

include := detector.IncludesFinderWithRegExp(output)

85 + 86 +

require.Equal(t, "Foobar.h", include)

87 +

}

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4