Skip to content

Commit 38d39e2

Browse files
committed
fixup: add import check
1 parent 7b281e5 commit 38d39e2

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

go-runner/src/builder/discovery.rs

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -92,25 +92,24 @@ impl GoPackage {
9292
};
9393

9494
// We don't support files with benchmarks that also contains github.com/frankban/quicktest
95-
// if file
96-
// .imports
97-
// .iter()
98-
// .any(|import| import.path.value.contains("github.com/frankban/quicktest"))
99-
// {
100-
// warn!("Skipping file with quicktest import: {file_path:?}");
101-
// continue;
102-
// }
103-
104-
// // We don't support testify yet
105-
// // FIXME: We shouldn't skip packages where benchmarks and tests are separated -> opentelemetry-go
106-
// if file
107-
// .imports
108-
// .iter()
109-
// .any(|import| import.path.value.contains("github.com/stretchr/testify"))
110-
// {
111-
// warn!("Skipping file with testify import: {file_path:?}");
112-
// continue;
113-
// }
95+
if file
96+
.imports
97+
.iter()
98+
.any(|import| import.path.value.contains("github.com/frankban/quicktest"))
99+
{
100+
warn!("Skipping file with quicktest import: {file_path:?}");
101+
continue;
102+
}
103+
104+
// We don't support testify yet
105+
if file
106+
.imports
107+
.iter()
108+
.any(|import| import.path.value.contains("github.com/stretchr/testify"))
109+
{
110+
warn!("Skipping file with testify import: {file_path:?}");
111+
continue;
112+
}
114113

115114
// We can't import packages that are declared as `main`
116115
if file.pkg_name.name == "main" {

0 commit comments

Comments
 (0)