Skip to content

Commit ce90466

Browse files
committed
Remove unused code
This code is not needed by the engine and so only makes maintenance of the project more difficult. Some of it because obsolete on the integration of Arduino Lint, while others had either fallen out of use during previous development epochs, or never ended up being used at all.
1 parent f12d3a8 commit ce90466

16 files changed

+1
-499
lines changed

go.mod

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ go 1.14
55
require (
66
github.com/arduino/go-paths-helper v1.5.0
77
github.com/arduino/golang-concurrent-workers v0.0.0-20170202182617-6710cdc954bc
8-
github.com/blang/semver v3.5.1+incompatible
98
github.com/go-git/go-git/v5 v5.3.0
10-
github.com/google/go-github v17.0.0+incompatible
11-
github.com/google/go-querystring v1.1.0 // indirect
9+
github.com/google/go-cmp v0.5.2 // indirect
1210
github.com/stretchr/testify v1.7.0
1311
github.com/vaughan0/go-ini v0.0.0-20130923145212-a98ad7ee00ec
1412
)

go.sum

-6
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ github.com/arduino/golang-concurrent-workers v0.0.0-20170202182617-6710cdc954bc
1111
github.com/arduino/golang-concurrent-workers v0.0.0-20170202182617-6710cdc954bc/go.mod h1:E+WBbLkFBdPp+N+yijgbdDI33mr5pm6j42RYLN5K4do=
1212
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
1313
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
14-
github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ=
15-
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
1614
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
1715
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1816
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
@@ -36,10 +34,6 @@ github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
3634
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
3735
github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
3836
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
39-
github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY=
40-
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
41-
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
42-
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
4337
github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
4438
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
4539
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=

libraries/bad_file_cleaner.go

-70
This file was deleted.

libraries/bad_file_cleaner_test.go

-45
This file was deleted.

libraries/cron/fill_missing_checksums.go

-76
This file was deleted.

libraries/github_release_downloader.go

-78
This file was deleted.

libraries/github_release_downloader_test.go

-40
This file was deleted.

libraries/metadata/metadata.go

-32
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ package metadata
3737

3838
import (
3939
"bytes"
40-
"context"
41-
"encoding/base64"
42-
"errors"
4340

44-
"github.com/google/go-github/github"
4541
ini "github.com/vaughan0/go-ini"
4642
)
4743

@@ -62,34 +58,6 @@ type LibraryMetadata struct {
6258
Depends string
6359
}
6460

65-
// ParsePullRequest makes a LibraryMetadata by reading library.properties from a github.PullRequest
66-
func ParsePullRequest(gh *github.Client, pull *github.PullRequest) (*LibraryMetadata, error) {
67-
head := *pull.Head
68-
headRepo := *head.Repo
69-
70-
// Get library.properties from pull request HEAD
71-
getContentOpts := &github.RepositoryContentGetOptions{
72-
Ref: *head.SHA,
73-
}
74-
libPropContent, _, _, err := gh.Repositories.GetContents(context.TODO(), *headRepo.Owner.Login, *headRepo.Name, "library.properties", getContentOpts)
75-
if err != nil {
76-
return nil, err
77-
}
78-
if libPropContent == nil {
79-
return nil, errors.New("library.properties file not found")
80-
}
81-
return ParseRepositoryContent(libPropContent)
82-
}
83-
84-
// ParseRepositoryContent makes a LibraryMetadata by reading library.properties from a github.RepositoryContent
85-
func ParseRepositoryContent(content *github.RepositoryContent) (*LibraryMetadata, error) {
86-
libPropertiesData, err := base64.StdEncoding.DecodeString(*content.Content)
87-
if err != nil {
88-
return nil, err
89-
}
90-
return Parse(libPropertiesData)
91-
}
92-
9361
// Parse makes a LibraryMetadata by parsing a library.properties file contained in a byte array
9462
func Parse(propertiesData []byte) (*LibraryMetadata, error) {
9563
// Create an io.Reader from []bytes

0 commit comments

Comments
 (0)