Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C#: Initial implementation of csv printing in FlowSummaries test #7178

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

@michaelnebel
Copy link
Contributor

@michaelnebel michaelnebel commented Nov 19, 2021

In this PR we change the way flow summaries are printed in the FlowSummaries.expected file.

The idea is that the printing result should be parseable as flow summaries written in CSV format.
This holds for the dataflow/libraries flow summaries test, but not for frameworks/EntityFramework.
For the latter case, we extend the the printing of ReturnKind slightly for the special cases, where the return kind is not a normal return kind. This means that these strings are not parsable as flow summaries.

Furthermore, the tests has been updated to reflect the new way of printing.

@github-actions github-actions bot added the C# label Nov 19, 2021
@michaelnebel michaelnebel force-pushed the csharp-flowsummary-pp-csv branch 11 times, most recently from 79d0261 to 1824df5 Nov 22, 2021
@michaelnebel michaelnebel force-pushed the csharp-flowsummary-pp-csv branch 7 times, most recently from 27b914c to 43180b4 Nov 23, 2021
@michaelnebel michaelnebel force-pushed the csharp-flowsummary-pp-csv branch 2 times, most recently from ee3d34b to 8f172bf Nov 23, 2021
@michaelnebel michaelnebel force-pushed the csharp-flowsummary-pp-csv branch 2 times, most recently from fe81d26 to ae09212 Nov 24, 2021
@michaelnebel michaelnebel force-pushed the csharp-flowsummary-pp-csv branch from ae09212 to a3ca9ad Nov 24, 2021
@michaelnebel michaelnebel marked this pull request as ready for review Nov 24, 2021
@michaelnebel michaelnebel requested review from as code owners Nov 24, 2021
Copy link
Contributor

@hvitved hvitved left a comment

Some trivial comments; otherwise looks great!

Loading

Loading
csharp/ql/test/shared/FlowSummaries.qll Outdated Show resolved Hide resolved
Loading
import semmle.code.csharp.dataflow.internal.FlowSummaryImpl::Private::TestOutput

abstract class IncludeSummarizedCallable extends RelevantSummarizedCallable {
/** Gets the qualified parameter types of this callable as a comma-separated string */
Copy link
Contributor

@hvitved hvitved Nov 24, 2021

Choose a reason for hiding this comment

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

All ql doc comments should end with a full stop .

Loading

Copy link
Contributor Author

@michaelnebel michaelnebel Nov 24, 2021

Choose a reason for hiding this comment

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

Will fix (and also look at the other comments). Is there a documented coding standard?

Loading

Copy link
Contributor

@hvitved hvitved Nov 24, 2021

Choose a reason for hiding this comment

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

Loading

csharp/ql/test/shared/FlowSummaries.qll Outdated Show resolved Hide resolved
Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants