安全な_pubspec_URL
pubspec.yaml
で安全なURLを使用してください。
このルールはDart 2.16から利用可能です。
ルールセット:core、recommended、flutter
詳細
#するべきこと 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
特に明記されていない限り、このサイトのドキュメントはDart 3.5.3を反映しています。ページの最終更新日:2024年7月3日。 ソースを表示 または 問題を報告する