Commit a545bb1
committed
Remove redundant name validation from
Library dependencies may be specified in the `depends` field of the library.properties library metadata file.
A regular expression is used to separate the dependency name and optional version constraint from each element of the
field during parsing of the file to add new releases to the DB.
A check is done to make sure the specified library names have a valid format. This project was originally solely
responsible for such checks. Since that time, a dedicated tool was created for validation of the library releases:
Arduino Lint.
Since Arduino Lint already does this check, and the DB entries are only added for releases which pass that check, the
validation via the extraction regular expression is superfluous and only increases the maintenance burden for no
benefit.
The regular expression has a single purpose: extracting the components of the depends field elements. This more simple
regular expression will accomplish that, given the data which has already been validated by Arduino Lint.depends extraction regex1 parent 1e00283 commit a545bb1
2 files changed
+2
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | 48 | | |
51 | 49 | | |
52 | 50 | | |
| |||
60 | 58 | | |
61 | 59 | | |
62 | 60 | | |
63 | | - | |
64 | 61 | | |
| 62 | + | |
65 | 63 | | |
66 | 64 | | |
67 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
0 commit comments