Using SonarAnalyzer.VisualBasic 8.27.0.35380, VB.Net and .Net Framework 4.8.0.
It’s saying that certain unused procedure parameters should be removed (S1172) but they need to stay to conform to the required format.
I’ve been either suppressing the warning or using the unused procedures unnecessarily.
Basic class example:
Imports System.ComponentModel
Public Class FalsePositive
Inherits DependencyObject
Implements INotifyPropertyChanged
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
Public Property DP() As Object
Get
Return GetValue(DPProperty)
End Get
Set(Value As Object)
SetValue(DPProperty, Value)
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(NameOf(DP)))
End Set
End Property
Public Shared ReadOnly DPProperty As DependencyProperty = DependencyProperty.Register("DP", GetType(Object), GetType(FalsePositive),
New FrameworkPropertyMetadata(Nothing, FrameworkPropertyMetadataOptions.None,
New PropertyChangedCallback(AddressOf DPChanged),
New CoerceValueCallback(AddressOf CoerceDP)))
Private Shared Sub DPChanged(d As DependencyObject, e As DependencyPropertyChangedEventArgs)
Dim Field As Object
End Sub
Private Shared Function CoerceDP(d As DependencyObject, Value As Object) As Object
Return Nothing
End Function
End Class
Not the most practical example but it occurs four times in this code.