fix: improve context root included files calculation #862
Conversation
Dart Code Metrics unused files report of dart_code_metrics. ✅Summary
|
Dart Code Metrics analyze report of dart_code_metrics. ✅Summary
|
Codecov Report
@@ Coverage Diff @@
## master #862 +/- ##
=======================================
Coverage 87.27% 87.27%
=======================================
Files 280 280
Lines 5942 5942
=======================================
Hits 5186 5186
Misses 756 756
Continue to review full report at Codecov.
|
lib/src/utils/analyzer_utils.dart
Outdated
@@ -36,7 +36,7 @@ Set<String> getFilePaths( | |||
final newPath = normalize(join(rootFolder, path)); | |||
final rootPath = context.contextRoot.root.path; | |||
|
|||
return newPath == rootPath || rootPath.startsWith('$newPath/'); | |||
return newPath == rootPath || newPath.startsWith('$rootPath/'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@incendial please cover by unit test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[X] Bug fix
[ ] New rule
[ ] Changes an existing rule
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
#850