Skip to content

extensions/extension-editing/src/extensionLinter.ts does not respect repository shorthand in package.json #60669

@mpiroc

Description

@mpiroc

VS Code warns about non-https relative image links in markdown files, with this message:

Relative image URLs require a repository with HTTPS protocol to be specified in the package.json.

If I update package.json to include a repository with an HTTPS URL, this warning goes away:

"repository": {
    "type": "git",
    "url": "https://github.com/user/repo"
}

However, there are other ways to specify a repository url. For example:

"repository": "github:user/repo"

In this case, the "repository" link will point to https://github.com/user/repo. But the extension-linter does not detect this case, and still shows the warning.

  • VSCode Version: 1.28.0 (user setup)
  • OS Version: Windows 10

Steps to Reproduce:

  1. Create a new GitHub project, and add a new VS Code extension to the repository.
  2. In package.json, specify the repository as "repository": "github:user/repo".
  3. In README.md, reference an image by its relative path.
  4. Open out the "problems" tab in VS Code.

Expected: No problems are reported.
Actual: extension-linter reports the warning Relative image URLs require a repository with HTTPS protocol to be specified in the package.json.

  1. Change the repository property's value to:
"repository": {
    "type": "git",
    "url": "https://github.com/user/repo"
}

Expected: No problems are reported.
Actual: Behaves as expected (no problems are reported).

Does this issue occur when all extensions are disabled?: Yes/No

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugextensions-developmentIssues for developing extensions

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions