Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate and drop String.dropFileProtocol() and Path.adaptedIsAbsolute() extensions #44

Open
3 tasks
0x6675636b796f75676974687562 opened this issue Mar 1, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@0x6675636b796f75676974687562
Copy link
Member

Since we now have full URI support in okio-extras, which can even decode URL-encoded sequences like %D0%A2%D0%B5%D1%81%D1%82, there's no need for simple heuristics like String.dropFileProtocol() and Path.adaptedIsAbsolute().

In addition to mere refactoring (which should be simple), extra steps should be made:

  • Collect real-life SARIF output from existing tools, such as pylint (pylint --output-format=sarif --disable=... --enable=... --output xyz.sarif) etc. Apparently, uri and uriBaseId fields may contain both file:// URIs and local paths, absolute or relative.
  • Cover the above scenarios with unit tests.
  • Add extra unit tests for cases when uri and/or uriBaseId contain unparseable garbage. The library should handle these cases gracefully, in a predictable and well-documented manner.

Current test coverage doesn't seem enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant