Skip to content

C#: Add body to partial methods#4055

Merged
hvitved merged 3 commits intogithub:mainfrom
tamasvajk:feature/partial-methods
Aug 20, 2020
Merged

C#: Add body to partial methods#4055
hvitved merged 3 commits intogithub:mainfrom
tamasvajk:feature/partial-methods

Conversation

@tamasvajk
Copy link
Contributor

@tamasvajk tamasvajk commented Aug 12, 2020

No description provided.

@tamasvajk tamasvajk changed the title Add body to partial methods C#: Add body to partial methods Aug 12, 2020
@tamasvajk tamasvajk requested a review from a team August 12, 2020 13:47
@tamasvajk tamasvajk marked this pull request as ready for review August 12, 2020 13:47
Copy link
Contributor

@calumgrant calumgrant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks correct to me (I'm not 100% familiar with Roslyn in this area but what you have said seems reasonable.)

Can we have some tests for this?

Should we also extract the partial modifier whilst we are at it?

@hvitved
Copy link
Contributor

hvitved commented Aug 13, 2020

Can we have some tests for this?

I agree. You can add for instance the test mentioned here: https://github.com/github/codeql-csharp-team/issues/48#issuecomment-668536295.

@tamasvajk
Copy link
Contributor Author

I though about adding the test, and then decided that the AST printing would already cover testing this too (through csharp/ql/test/library-tests/partial/PrintAst.qll). I'll add a test anyways, that way this PR is more self contained.

@adityasharad adityasharad changed the base branch from master to main August 14, 2020 18:33
@tamasvajk
Copy link
Contributor Author

@calumgrant I think the partial modifier is already extracted. We are storing all source level modifiers.

@tamasvajk tamasvajk force-pushed the feature/partial-methods branch from 4952f0b to beeadea Compare August 18, 2020 08:26
@tamasvajk tamasvajk mentioned this pull request Aug 18, 2020
@hvitved hvitved dismissed calumgrant’s stale review August 20, 2020 08:14

Comments addressed; dismissing so we can get this merged.

@hvitved hvitved merged commit 65b4d35 into github:main Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants