You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, to check if the npm/yarn package is used in files we are only checking that the file contains the package name.
We'll need to modify thoses conditions to improve file dependencies checking.
For example, now we're using the string_exists_in_multiline_text function:
pubfnstring_exists_in_multiline_text(term:&str,content:&str) -> bool{for line in content.lines(){if line.contains(term){returntrue;}}false}
NOTE: We are reading files line by line because generally import are matched in like 10-20 first lines.
I think that we should move and rename this function into the Project trait to handle multiple (project's relative) ways to check if the dependency is used in the file.
Example for NodeJS Projects that should detect lines like :
import foo from "bar";
import "foo";
import { Foo } from "bar";
Remember to handle CSS/Scss files too.
And in JSON file a think that we should only match the values and not the keys but I didn't thought too much of it.
The text was updated successfully, but these errors were encountered:
Today, to check if the npm/yarn package is used in files we are only checking that the file contains the package name.
We'll need to modify thoses conditions to improve file dependencies checking.
For example, now we're using the
string_exists_in_multiline_text
function:I think that we should move and rename this function into the
Project
trait to handle multiple (project's relative) ways to check if the dependency is used in the file.Example for NodeJS Projects that should detect lines like :
import foo from "bar";
import "foo";
import { Foo } from "bar";
Remember to handle CSS/Scss files too.
And in JSON file a think that we should only match the values and not the keys but I didn't thought too much of it.
The text was updated successfully, but these errors were encountered: