@@ -53,7 +53,7 @@ fn find_project_roots(root_path: impl AsRef<Path>) -> Vec<ProjectRoot> {
5353 let mut project_roots = Vec :: new ( ) ;
5454
5555 for entry in Walk :: new ( root_path) . flatten ( ) {
56- if !entry. file_type ( ) . map_or ( false , |ft| ft. is_file ( ) ) {
56+ if !entry. file_type ( ) . is_some_and ( |ft| ft. is_file ( ) ) {
5757 continue ;
5858 }
5959
@@ -217,21 +217,28 @@ mod tests {
217217 github.com/aws/aws-sdk-go-v2/credentials v1.13.43
218218 github.com/aws/aws-sdk-go-v2/service/route53 v1.30.2
219219 github.com/cespare/cp v0.1.0
220- github.com/cloudflare/cloudflare-go v0.79.0
221- github.com/cockroachdb/pebble v1.1.2
222- github.com/consensys/gnark-crypto v0.14.0
223- github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a
220+ github.com/cloudflare/cloudflare-go v0.79.0 //indirect
221+ github.com/cockroachdb/pebble v1.1.2 //indirect
224222 github.com/crate-crypto/go-kzg-4844 v1.1.0
225- github.com/davecgh/go-spew v1.1.1
226- )"# ;
223+ github.com/davecgh/go-spew v1.1.1 # Another comment
224+ github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a
225+ github.com/consensys/gnark-crypto v0.14.0
226+ github.com/go-sourcemap/sourcemap v2.1.3+incompatible // Check the version
227+ )
228+
229+ require example.com/theirmodule v1.3.4
230+
231+ require (github.com/some/module v1.0.0)
232+ require (github.com/another/module v2.3.4)
233+ require (github.com/mixed-case/Module v3.5.7-beta)"# ;
227234 fs:: write ( & go_mod_path, dependencies) . unwrap ( ) ;
228235
229236 let result = parse_dependencies ( & ProjectRoot {
230237 path : temp_dir. path ( ) . to_path_buf ( ) ,
231238 project_type : Language :: Go ( "go.mod" ) ,
232239 } ) ;
233240 let parsed = get_go_dependencies ( dependencies. to_string ( ) ) ;
234- assert ! ( parsed. len( ) == 14 ) ;
241+ assert ! ( parsed. len( ) == 19 ) ;
235242 assert ! ( result. len( ) == parsed. len( ) ) ;
236243 }
237244
0 commit comments