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
They are present with different names and sometimes even with different parameters. This is confusing and hard to document.
Imo, we should create an abstract method in the DataSource class with a uniform name and parameters. This would also help me build the small documentation I'm working on for vulnerablecode better.
The text was updated successfully, but these errors were encountered:
But creating an abstract method would only solve the naming problem and parameter stuff. Each datasource would need implement the same stuff, hence we would have code duplication.
A better way would be to have a helper function(not tied to any class) which does this. Univers can infer package type using if the parameters are sent using the syntax mentioned in #119 (comment)
This is confusing and hard to document.
Imo, we should create an abstract method in the DataSource class with a uniform name and parameters. This would also help me build the small documentation I'm working on for vulnerablecode better.
I kinda agree there. Abstract methods or just base methods in a base class are a way to document the expectations of the various classes. They may not obey but that's good documentation in all cases IMHO
A function to categorize versions into affected and safe versions is present in multiple importers such as
https://github.com/nexB/vulnerablecode/blob/e9943b014f5f07b970988f910b2aaebcec0a6e58/vulnerabilities/importers/github.py#L320-L338
https://github.com/nexB/vulnerablecode/blob/e9943b014f5f07b970988f910b2aaebcec0a6e58/vulnerabilities/importers/apache_httpd.py#L129-L148
https://github.com/nexB/vulnerablecode/blob/e9943b014f5f07b970988f910b2aaebcec0a6e58/vulnerabilities/importers/istio.py#L66-L83
They are present with different names and sometimes even with different parameters. This is confusing and hard to document.
Imo, we should create an abstract method in the
DataSource
class with a uniform name and parameters. This would also help me build the small documentation I'm working on for vulnerablecode better.The text was updated successfully, but these errors were encountered: