Conversation
Codecov Report
@@ Coverage Diff @@
## master #387 +/- ##
==========================================
+ Coverage 95.66% 95.67% +0.01%
==========================================
Files 55 55
Lines 7543 7565 +22
Branches 1838 1842 +4
==========================================
+ Hits 7216 7238 +22
Misses 203 203
Partials 124 124
Continue to review full report at Codecov.
|
047e688 to
c73138a
Compare
|
arthurzam
left a comment
There was a problem hiding this comment.
I think we should also add a testdata/repos/standalone/PackageMetadataXmlCheck/ValidRemoteID/metadata.xml which will hold valid remotes (one for each remote).
7ac4aca to
455e3f6
Compare
|
Ok, I don't think we can cover the |
|
Ah, right, need to bump pkgcore dep to get fresh XML Schema. |
|
Ok, I think it's ready now. |
Add an auxiliary check for invalid remote-id values. At the moment, it primarily checks for the correct number of path components and some obvious mistakes. In the future, the regular expressions can be improved to catch invalid user/project names as well. This includes tests for common valid and invalid values for the current set of remote-ids. In addition to that, PkgMetadataXmlEmptyElement check is extended to cover "empty <remote-id/>" path in the code. Unfortunately, covering "unknown type" path is non-trivial as it requires a remote-id type that is allowed by the XML Schema but not covered by validation (which normally happens only when Schema is updated). This also requires bumping the minimal pkgcore version in order to grab XML Schema updates (adding "osdn" remote type).
Current output