目次

安全な_pubspec_URL

pubspec.yamlで安全なURLを使用してください。

このルールはDart 2.16から利用可能です。

ルールセット:corerecommendedflutter

詳細

#

するべきこと pubspec.yamlで安全なURLを使用してください。

httpまたはgit:の代わりにhttpsを使用してください。

悪い例

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

良い例

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

使用方法

#

secure_pubspec_urlsルールを有効にするには、analysis_options.yamlファイルの**linter > rules**の下にsecure_pubspec_urlsを追加します。

analysis_options.yaml
yaml
linter:
  rules:
    - secure_pubspec_urls