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

File tree

16 files changed

+1
-499
lines changed

16 files changed

+1
-499
lines changed

go.mod

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

Lines changed: 0 additions & 6 deletions
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

Lines changed: 0 additions & 70 deletions
This file was deleted.

libraries/bad_file_cleaner_test.go

Lines changed: 0 additions & 45 deletions
This file was deleted.

libraries/cron/fill_missing_checksums.go

Lines changed: 0 additions & 76 deletions
This file was deleted.

libraries/github_release_downloader.go

Lines changed: 0 additions & 78 deletions
This file was deleted.

libraries/github_release_downloader_test.go

Lines changed: 0 additions & 40 deletions
This file was deleted.

libraries/metadata/metadata.go

Lines changed: 0 additions & 32 deletions
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)