vb-winforms — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited vb-winforms (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
.Designer.vb を直接編集しない。再生成時に変更が失われる。 ' View インターフェース — フォームがこれを実装する
Public Interface ICustomerView
Property CustomerName As String
Event SaveRequested As EventHandler
Sub ShowError(message As String)
End Interface
' Presenter — UI なしでテスト可能
Public Class CustomerPresenter
Private ReadOnly _view As ICustomerView
Private ReadOnly _service As ICustomerService
Public Sub New(view As ICustomerView, service As ICustomerService)
_view = view
_service = service
AddHandler _view.SaveRequested, Async Sub(s, e)
Try
Await _service.SaveAsync(_view.CustomerName)
Catch ex As Exception
_view.ShowError(ex.Message)
End Try
End Sub
End Sub
End Class Imports Microsoft.Extensions.DependencyInjection
Imports System.Windows.Forms
Module Program
<STAThread>
Sub Main()
' .NET 6+ の WinForms ソースジェネレータが生成する初期化ヘルパー
' (<OutputType>WinExe</OutputType> + <UseWindowsForms>true</UseWindowsForms> の
' プロジェクトで自動生成される。Library ビルドでは使用不可)
ApplicationConfiguration.Initialize()
' 旧来の個別呼び出し形式(.NET 5 以前や手動制御したい場合):
' Application.EnableVisualStyles()
' Application.SetCompatibleTextRenderingDefault(False)
' Application.SetHighDpiMode(HighDpiMode.SystemAware)
Dim services As New ServiceCollection()
services.AddSingleton(Of ICustomerService, CustomerService)()
services.AddTransient(Of MainForm)()
Using sp = services.BuildServiceProvider()
Application.Run(sp.GetRequiredService(Of MainForm)())
End Using
End Sub
End Module必須事項: <STAThread> 属性(WinForms は STA 必須)、Module Program + Sub Main(VB.NET は top-level statements を持たない)、ApplicationConfiguration.Initialize() または従来 3 API 呼び出し(ビジュアルスタイル + DPI 対応)。これらを省略すると正しく起動しない。
Progress(Of T) を使用する。UI スレッドをブロックしない。ValidateChildren() を呼び出す。flowchart LR
A["Form event"] --> B["Presenter handles logic"]
B --> C["Service layer / data access"]
C --> D["Update view via interface"]
D --> E["Validate and display results"]| 決定事項 | ガイダンス |
|---|---|
| MVP vs MVVM | WinForms では MVP を推奨 — イベント駆動モデルとの親和性が高い |
| BindingSource vs 手動 | リスト/詳細バインディングでは常に BindingSource を優先する |
| 同期 vs 非同期 I/O | 常に非同期 — Async Sub はイベントハンドラにのみ使用する |
| カスタムコントロール | フォームが約 300 行を超えたら再利用可能な UserControl に抽出する |
| .NET Framework → .NET | 公式移行ガイドを使用し、まずデザイナーの互換性を検証する |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.