From f887420db883c2dab529400f8c85328c7c785145 Mon Sep 17 00:00:00 2001 From: Przemyslaw Delewski <102958445+pdelewski@users.noreply.github.com> Date: Fri, 14 Apr 2023 16:32:36 +0200 Subject: [PATCH] instrgen fixing imports (#3682) * instrgen fixing imports * instrgen - adding comment about decision behind disabling linter --------- Co-authored-by: Przemek Delewski Co-authored-by: Chester Cheung --- instrgen/driver/testdata/basic/fib.go | 2 +- instrgen/driver/testdata/basic/goroutines.go | 4 +--- instrgen/driver/testdata/basic/main.go | 2 +- instrgen/driver/testdata/basic/methods.go | 6 +----- instrgen/driver/testdata/basic/package.go | 4 +--- instrgen/driver/testdata/dummy/main.go | 2 +- instrgen/driver/testdata/expected/basic/fib.go | 2 +- instrgen/driver/testdata/expected/basic/goroutines.go | 4 +--- instrgen/driver/testdata/expected/basic/main.go | 2 +- instrgen/driver/testdata/expected/basic/methods.go | 5 ++--- instrgen/driver/testdata/expected/basic/package.go | 4 +--- instrgen/driver/testdata/expected/interface/app/impl.go | 2 +- instrgen/driver/testdata/expected/interface/main.go | 2 +- .../testdata/expected/interface/serializer/interface.go | 2 +- instrgen/driver/testdata/expected/selector/main.go | 2 +- instrgen/driver/testdata/funwithoutpathtoroot/driver.go | 2 +- instrgen/driver/testdata/interface/app/impl.go | 2 +- instrgen/driver/testdata/interface/main.go | 2 +- instrgen/driver/testdata/interface/serializer/interface.go | 2 +- instrgen/driver/testdata/selector/main.go | 2 +- 20 files changed, 21 insertions(+), 34 deletions(-) diff --git a/instrgen/driver/testdata/basic/fib.go b/instrgen/driver/testdata/basic/fib.go index 835a4899a86..343f04a0988 100644 --- a/instrgen/driver/testdata/basic/fib.go +++ b/instrgen/driver/testdata/basic/fib.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//nolint:all +//nolint:all // Linter is executed at the same time as tests which leads to race conditions and failures. package main import ( diff --git a/instrgen/driver/testdata/basic/goroutines.go b/instrgen/driver/testdata/basic/goroutines.go index 47d913c0305..4dc896692ab 100644 --- a/instrgen/driver/testdata/basic/goroutines.go +++ b/instrgen/driver/testdata/basic/goroutines.go @@ -12,13 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -//nolint:all +//nolint:all // Linter is executed at the same time as tests which leads to race conditions and failures. package main import ( "fmt" - - "go.opentelemetry.io/contrib/instrgen/rtlib" ) func goroutines() { diff --git a/instrgen/driver/testdata/basic/main.go b/instrgen/driver/testdata/basic/main.go index 6bb99a5db64..edcb0b5fcf3 100644 --- a/instrgen/driver/testdata/basic/main.go +++ b/instrgen/driver/testdata/basic/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//nolint:all +//nolint:all // Linter is executed at the same time as tests which leads to race conditions and failures. package main import ( diff --git a/instrgen/driver/testdata/basic/methods.go b/instrgen/driver/testdata/basic/methods.go index 6152e0bdd56..c0afb1c5b85 100644 --- a/instrgen/driver/testdata/basic/methods.go +++ b/instrgen/driver/testdata/basic/methods.go @@ -12,13 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -//nolint:all +//nolint:all // Linter is executed at the same time as tests which leads to race conditions and failures. package main -import ( - "go.opentelemetry.io/contrib/instrgen/rtlib" -) - type element struct { } diff --git a/instrgen/driver/testdata/basic/package.go b/instrgen/driver/testdata/basic/package.go index 03e721c9450..09e736ba9a8 100644 --- a/instrgen/driver/testdata/basic/package.go +++ b/instrgen/driver/testdata/basic/package.go @@ -12,13 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -//nolint:all +//nolint:all // Linter is executed at the same time as tests which leads to race conditions and failures. package main import ( "os" - - "go.opentelemetry.io/contrib/instrgen/rtlib" ) func Close() error { diff --git a/instrgen/driver/testdata/dummy/main.go b/instrgen/driver/testdata/dummy/main.go index 5b219294793..dd08834f57a 100644 --- a/instrgen/driver/testdata/dummy/main.go +++ b/instrgen/driver/testdata/dummy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//nolint:all +//nolint:all // Linter is executed at the same time as tests which leads to race conditions and failures. package main func main() { diff --git a/instrgen/driver/testdata/expected/basic/fib.go b/instrgen/driver/testdata/expected/basic/fib.go index 700cc037ebb..fea3dd6fb36 100644 --- a/instrgen/driver/testdata/expected/basic/fib.go +++ b/instrgen/driver/testdata/expected/basic/fib.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//nolint:all +//nolint:all // Linter is executed at the same time as tests which leads to race conditions and failures. package main import ( diff --git a/instrgen/driver/testdata/expected/basic/goroutines.go b/instrgen/driver/testdata/expected/basic/goroutines.go index 5579749a30e..69ef766b180 100644 --- a/instrgen/driver/testdata/expected/basic/goroutines.go +++ b/instrgen/driver/testdata/expected/basic/goroutines.go @@ -12,14 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -//nolint:all +//nolint:all // Linter is executed at the same time as tests which leads to race conditions and failures. package main import ( "fmt" __atel_context "context" - - "go.opentelemetry.io/contrib/instrgen/rtlib" __atel_otel "go.opentelemetry.io/otel" ) diff --git a/instrgen/driver/testdata/expected/basic/main.go b/instrgen/driver/testdata/expected/basic/main.go index 4314e8e627a..5e7459b9670 100644 --- a/instrgen/driver/testdata/expected/basic/main.go +++ b/instrgen/driver/testdata/expected/basic/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//nolint:all +//nolint:all // Linter is executed at the same time as tests which leads to race conditions and failures. package main import ( diff --git a/instrgen/driver/testdata/expected/basic/methods.go b/instrgen/driver/testdata/expected/basic/methods.go index 5f0d60c9760..9bd7ba4c5cf 100644 --- a/instrgen/driver/testdata/expected/basic/methods.go +++ b/instrgen/driver/testdata/expected/basic/methods.go @@ -12,13 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -//nolint:all +//nolint:all // Linter is executed at the same time as tests which leads to race conditions and failures. package main import ( - "go.opentelemetry.io/contrib/instrgen/rtlib" - __atel_otel "go.opentelemetry.io/otel" __atel_context "context" + __atel_otel "go.opentelemetry.io/otel" ) type element struct { diff --git a/instrgen/driver/testdata/expected/basic/package.go b/instrgen/driver/testdata/expected/basic/package.go index 5e990d62fa8..339372a3c33 100644 --- a/instrgen/driver/testdata/expected/basic/package.go +++ b/instrgen/driver/testdata/expected/basic/package.go @@ -12,14 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -//nolint:all +//nolint:all // Linter is executed at the same time as tests which leads to race conditions and failures. package main import ( "os" __atel_context "context" - - "go.opentelemetry.io/contrib/instrgen/rtlib" __atel_otel "go.opentelemetry.io/otel" ) diff --git a/instrgen/driver/testdata/expected/interface/app/impl.go b/instrgen/driver/testdata/expected/interface/app/impl.go index 19433eaeb6a..ec59c51ab7e 100644 --- a/instrgen/driver/testdata/expected/interface/app/impl.go +++ b/instrgen/driver/testdata/expected/interface/app/impl.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//nolint:all +//nolint:all // Linter is executed at the same time as tests which leads to race conditions and failures. package app import ( diff --git a/instrgen/driver/testdata/expected/interface/main.go b/instrgen/driver/testdata/expected/interface/main.go index 01b73a74145..4a7870eccc1 100644 --- a/instrgen/driver/testdata/expected/interface/main.go +++ b/instrgen/driver/testdata/expected/interface/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//nolint:all +//nolint:all // Linter is executed at the same time as tests which leads to race conditions and failures. package main import ( diff --git a/instrgen/driver/testdata/expected/interface/serializer/interface.go b/instrgen/driver/testdata/expected/interface/serializer/interface.go index be7ae9e4dab..9f258907ff3 100644 --- a/instrgen/driver/testdata/expected/interface/serializer/interface.go +++ b/instrgen/driver/testdata/expected/interface/serializer/interface.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//nolint:all +//nolint:all // Linter is executed at the same time as tests which leads to race conditions and failures. package serializer import __atel_context "context" diff --git a/instrgen/driver/testdata/expected/selector/main.go b/instrgen/driver/testdata/expected/selector/main.go index ea7cf370b6d..f743f27b3fa 100644 --- a/instrgen/driver/testdata/expected/selector/main.go +++ b/instrgen/driver/testdata/expected/selector/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//nolint:all +//nolint:all // Linter is executed at the same time as tests which leads to race conditions and failures. package main import ( diff --git a/instrgen/driver/testdata/funwithoutpathtoroot/driver.go b/instrgen/driver/testdata/funwithoutpathtoroot/driver.go index c1499f2b33c..da8176819b6 100644 --- a/instrgen/driver/testdata/funwithoutpathtoroot/driver.go +++ b/instrgen/driver/testdata/funwithoutpathtoroot/driver.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//nolint:all +//nolint:all // Linter is executed at the same time as tests which leads to race conditions and failures. package main import ( diff --git a/instrgen/driver/testdata/interface/app/impl.go b/instrgen/driver/testdata/interface/app/impl.go index 9e186959e61..37f20f89973 100644 --- a/instrgen/driver/testdata/interface/app/impl.go +++ b/instrgen/driver/testdata/interface/app/impl.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//nolint:all +//nolint:all // Linter is executed at the same time as tests which leads to race conditions and failures. package app import ( diff --git a/instrgen/driver/testdata/interface/main.go b/instrgen/driver/testdata/interface/main.go index 5ec2cf8651d..6f5a2b64a9e 100644 --- a/instrgen/driver/testdata/interface/main.go +++ b/instrgen/driver/testdata/interface/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//nolint:all +//nolint:all // Linter is executed at the same time as tests which leads to race conditions and failures. package main import ( diff --git a/instrgen/driver/testdata/interface/serializer/interface.go b/instrgen/driver/testdata/interface/serializer/interface.go index 83ff55d2278..e7e81f9aa67 100644 --- a/instrgen/driver/testdata/interface/serializer/interface.go +++ b/instrgen/driver/testdata/interface/serializer/interface.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//nolint:all +//nolint:all // Linter is executed at the same time as tests which leads to race conditions and failures. package serializer type Serializer interface { diff --git a/instrgen/driver/testdata/selector/main.go b/instrgen/driver/testdata/selector/main.go index 696e0a36308..32db5834897 100644 --- a/instrgen/driver/testdata/selector/main.go +++ b/instrgen/driver/testdata/selector/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//nolint:all +//nolint:all // Linter is executed at the same time as tests which leads to race conditions and failures. package main import (