From cb47be043874c004810a3fd5ffa450fe20c92e12 Mon Sep 17 00:00:00 2001 From: Przemek Delewski Date: Wed, 5 Apr 2023 15:13:51 +0200 Subject: [PATCH 1/2] instrgen fixing imports --- instrgen/driver/testdata/basic/goroutines.go | 2 -- instrgen/driver/testdata/basic/methods.go | 4 ---- instrgen/driver/testdata/basic/package.go | 2 -- instrgen/driver/testdata/expected/basic/goroutines.go | 2 -- instrgen/driver/testdata/expected/basic/methods.go | 3 +-- instrgen/driver/testdata/expected/basic/package.go | 2 -- 6 files changed, 1 insertion(+), 14 deletions(-) diff --git a/instrgen/driver/testdata/basic/goroutines.go b/instrgen/driver/testdata/basic/goroutines.go index 47d913c0305..d647e38f70f 100644 --- a/instrgen/driver/testdata/basic/goroutines.go +++ b/instrgen/driver/testdata/basic/goroutines.go @@ -17,8 +17,6 @@ package main import ( "fmt" - - "go.opentelemetry.io/contrib/instrgen/rtlib" ) func goroutines() { diff --git a/instrgen/driver/testdata/basic/methods.go b/instrgen/driver/testdata/basic/methods.go index 6152e0bdd56..112bfe3db41 100644 --- a/instrgen/driver/testdata/basic/methods.go +++ b/instrgen/driver/testdata/basic/methods.go @@ -15,10 +15,6 @@ //nolint:all 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..3bc490625ac 100644 --- a/instrgen/driver/testdata/basic/package.go +++ b/instrgen/driver/testdata/basic/package.go @@ -17,8 +17,6 @@ package main import ( "os" - - "go.opentelemetry.io/contrib/instrgen/rtlib" ) func Close() error { diff --git a/instrgen/driver/testdata/expected/basic/goroutines.go b/instrgen/driver/testdata/expected/basic/goroutines.go index 5579749a30e..90a6acb139d 100644 --- a/instrgen/driver/testdata/expected/basic/goroutines.go +++ b/instrgen/driver/testdata/expected/basic/goroutines.go @@ -18,8 +18,6 @@ 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/methods.go b/instrgen/driver/testdata/expected/basic/methods.go index 5f0d60c9760..8bf0f7b61bc 100644 --- a/instrgen/driver/testdata/expected/basic/methods.go +++ b/instrgen/driver/testdata/expected/basic/methods.go @@ -16,9 +16,8 @@ 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..6b988f4bdb0 100644 --- a/instrgen/driver/testdata/expected/basic/package.go +++ b/instrgen/driver/testdata/expected/basic/package.go @@ -18,8 +18,6 @@ package main import ( "os" __atel_context "context" - - "go.opentelemetry.io/contrib/instrgen/rtlib" __atel_otel "go.opentelemetry.io/otel" ) From a1fcf29ac7d9042f71352455626deaa8a62b910a Mon Sep 17 00:00:00 2001 From: Przemek Delewski Date: Wed, 12 Apr 2023 12:38:04 +0200 Subject: [PATCH 2/2] instrgen - adding comment about decision behind disabling linter --- instrgen/driver/testdata/basic/fib.go | 2 +- instrgen/driver/testdata/basic/goroutines.go | 2 +- instrgen/driver/testdata/basic/main.go | 2 +- instrgen/driver/testdata/basic/methods.go | 2 +- instrgen/driver/testdata/basic/package.go | 2 +- instrgen/driver/testdata/dummy/main.go | 2 +- instrgen/driver/testdata/expected/basic/fib.go | 2 +- instrgen/driver/testdata/expected/basic/goroutines.go | 2 +- instrgen/driver/testdata/expected/basic/main.go | 2 +- instrgen/driver/testdata/expected/basic/methods.go | 2 +- instrgen/driver/testdata/expected/basic/package.go | 2 +- instrgen/driver/testdata/expected/interface/app/impl.go | 2 +- instrgen/driver/testdata/expected/interface/main.go | 2 +- .../driver/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, 20 insertions(+), 20 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 d647e38f70f..4dc896692ab 100644 --- a/instrgen/driver/testdata/basic/goroutines.go +++ b/instrgen/driver/testdata/basic/goroutines.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/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 112bfe3db41..c0afb1c5b85 100644 --- a/instrgen/driver/testdata/basic/methods.go +++ b/instrgen/driver/testdata/basic/methods.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 type element struct { diff --git a/instrgen/driver/testdata/basic/package.go b/instrgen/driver/testdata/basic/package.go index 3bc490625ac..09e736ba9a8 100644 --- a/instrgen/driver/testdata/basic/package.go +++ b/instrgen/driver/testdata/basic/package.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/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 90a6acb139d..69ef766b180 100644 --- a/instrgen/driver/testdata/expected/basic/goroutines.go +++ b/instrgen/driver/testdata/expected/basic/goroutines.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/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 8bf0f7b61bc..9bd7ba4c5cf 100644 --- a/instrgen/driver/testdata/expected/basic/methods.go +++ b/instrgen/driver/testdata/expected/basic/methods.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/package.go b/instrgen/driver/testdata/expected/basic/package.go index 6b988f4bdb0..339372a3c33 100644 --- a/instrgen/driver/testdata/expected/basic/package.go +++ b/instrgen/driver/testdata/expected/basic/package.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/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 (