Nullability: conversion behavior
Maybe we jinxed it after all?
This is my first PR to the repo. Guidance is very helpful. Think of the lines of this PR as a series of questions: how far to go, whether it's worth going here, how do we do things?
@BillWagner Would you like to take a look at these added nullability examples since you had been working on previous ones?
Ii think you need to be looking for ^>.*\r\n> *\r\n in a block quote but not in a contained code block in the block quote (i.e. just be wary of false +ve’s). This sequence occurs at the start & end of this particular code block. As Bill mentions you can disable particular errors in a file, just add HTML comments:
Disable one or more rules by name: Enable one or more rules by name: <!-- markdownlint-enable MD001 MD005 —>
On 17/04/2025, at 10:56 am, Joseph Musser @.***> wrote:
@jnm2 commented on this pull request.
In standard/types.md https://github.com/dotnet/csharpstandard/pull/1242#discussion_r2047899850:
+> { +> public void M1(string p) +> { +> _ = (string?)p; // No warning, widening +> } +> +> public void M2(string? p) +> { +> _ = (string)p; // Warning, narrowing +> _ = (string)p!; // No warning, suppressed +> } +> } +> ``` +> +> end example
I might be misunderstanding. This seems to be rule https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md028.md. Scrolling through files and a regex search in all files for ^>.*\r\n\r\n> didn't turn anything up, so I haven't found any examples to follow.
Looking at what this rule is, it seems to be saving people from creating block quotes that get unified by some parsers and not others. If that's not a concern in this spot, then it seems that it must not be a concern for the entire repo, and maybe we could ignore MD028 globally with the run of this tool. What do you think?
— Reply to this email directly, view it on GitHub https://github.com/dotnet/csharpstandard/pull/1242#discussion_r2047899850, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSYVW25CK5JCOPYYOQGUJ32Z3NZNAVCNFSM6AAAAABUOEA7CKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDONZUGA3DQOBTGA. You are receiving this because you were mentioned.
CI is nice and fast. Really neat system here!
@BillWagner With one review, am I okay to merge this?
@BillWagner With one review, am I okay to merge this?
I had one final suggestion, and then yes, let's :shipit: