secure_pubspec_urls

Group: pub

Maturity: stable

Dart SDK: >= 2.16.0 • (Linter v1.15.0)

Since info is static, may be stale

View all Lint Rules

Using the Linter

DO Use secure urls in pubspec.yaml.

Use https instead of http or git:.

BAD:

repository: http://github.com/dart-lang/example
git:
  url: git://github.com/dart-lang/example/example.git

GOOD:

repository: https://github.com/dart-lang/example

Usage

To enable the secure_pubspec_urls lint, add secure_pubspec_urls under linter > rules in your analysis_options.yaml file:

linter:
  rules:
    - secure_pubspec_urls