Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix analyzer RCS1208#1462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
josefpihrt wants to merge5 commits intomain
base:main
Choose a base branch
Loading
fromfix/reduce-if-nesting
Open

Fix analyzer RCS1208#1462

josefpihrt wants to merge5 commits intomainfromfix/reduce-if-nesting

Conversation

@josefpihrt
Copy link
Collaborator

fixes#1454

@josefpihrtjosefpihrt self-assigned thisMay 8, 2024
@BenjaminBrienen
Copy link
Contributor

Would this fix this issue?

publicvoidSetup(MarkdownPipelineBuilderpipeline){if(pipeline.BlockParsers.Find<HeadingBlockParser>()isHeadingBlockParserheadingBlockParser){// Install a hook on the HeadingBlockParser when a HeadingBlock is actually processedheadingBlockParser.Closed-=HeadingBlockParser_Closed;headingBlockParser.Closed+=HeadingBlockParser_Closed;}if(pipeline.BlockParsers.FindExact<ParagraphBlockParser>()isParagraphBlockParserparagraphBlockParser)// Reduce 'if' nesting RCS1208{// Install a hook on the ParagraphBlockParser when a HeadingBlock is actually processed as a Setex headingparagraphBlockParser.Closed-=HeadingBlockParser_Closed;paragraphBlockParser.Closed+=HeadingBlockParser_Closed;}}

@josefpihrt
Copy link
CollaboratorAuthor

I'm not sure that I'm following you.

@BenjaminBrienen
Copy link
Contributor

BenjaminBrienen commentedMay 1, 2025
edited
Loading

It suggests to invert that second if-block even though it wouldn't improve readability. This PR seems to add the concept of a "last if-block" and allows them.

@josefpihrt
Copy link
CollaboratorAuthor

Tbh, I was working on this fix couple of months ago and the only thing I recall is that fix is almost impossible so I gave up 🙂

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

@josefpihrtjosefpihrt

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

RCS1208 False-positive on flat if statement with multiple conditions

3 participants

@josefpihrt@BenjaminBrienen

[8]ページ先頭

©2009-2025 Movatter.jp