Skip to content

WPF0060 is dependent on newlines and whitespace #329

@lennartb-

Description

@lennartb-

The code fix for WPF0060 produces this code:

/// <summary>Identifies the <see cref="SomeDependencyProperty"/> dependency property.</summary>
public static readonly DependencyProperty SomeDependencyPropertyProperty=
    DependencyProperty.Register(nameof(SomeDependencyProperty), typeof(bool), typeof(Whatever), new PropertyMetadata(false));

Reformatting (with R# or any other tool) to

/// <summary>
///     Identifies the <see cref="SomeDependencyProperty" /> dependency property.
/// </summary>
public static readonly DependencyProperty SomeDependencyPropertyProperty=
    DependencyProperty.Register(nameof(SomeDependencyProperty), typeof(bool), typeof(Whatever), new PropertyMetadata(false));

triggers the warning again. Even altering the whitespace from the code fix, i.e.

/// <summary> Identifies the <see cref="SomeDependencyProperty"/> dependency property. </summary>

does so.

Whitespace and Newlines shouldn't be triggering the analyzer as long as the string is correct. For comparison SA1624, which is the same for ctor documentation, allows this, as long as the text matches the one required by the analyzer.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions