| Dec |
JAN |
Feb |
|
05 |
|
| 2025 |
2026 |
2027 |
About this capture
The Wayback Machine - http://web.archive.org/web/20260105050842/https://github.com/github/codeql/pull/7577
Skip to content
Navigation Menu
Appearance settings
AI CODE CREATION
GitHub CopilotWrite better code with AI
GitHub SparkBuild and deploy intelligent apps
GitHub ModelsManage and compare prompts
MCP RegistryNewIntegrate external tools
DEVELOPER WORKFLOWS
ActionsAutomate any workflow
CodespacesInstant dev environments
IssuesPlan and track work
Code ReviewManage code changes
APPLICATION SECURITY
GitHub Advanced SecurityFind and fix vulnerabilities
Code securitySecure your code as you build
Secret protectionStop leaks before they start
EXPLORE
●Why GitHub
●Documentation
●Blog
●Changelog
●Marketplace
View all features
BY COMPANY SIZE
●Enterprises
●Small and medium teams
●Startups
●Nonprofits
BY USE CASE
●App Modernization
●DevSecOps
●DevOps
●CI/CD
●View all use cases
BY INDUSTRY
●Healthcare
●Financial services
●Manufacturing
●Government
●View all industries
View all solutions
EXPLORE BY TOPIC
●AI
●Software Development
●DevOps
●Security
●View all topics
EXPLORE BY TYPE
●Customer stories
●Events & webinars
●Ebooks & reports
●Business insights
●GitHub Skills
SUPPORT & SERVICES
●Documentation
●Customer support
●Community forum
●Trust center
●Partners
COMMUNITY
GitHub SponsorsFund open source developers
PROGRAMS
●Security Lab
●Maintainer Community
●Accelerator
●Archive Program
REPOSITORIES
●Topics
●Trending
●Collections
ENTERPRISE SOLUTIONS
Enterprise platformAI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced SecurityEnterprise-grade security features
Copilot for BusinessEnterprise-grade AI features
Premium SupportEnterprise-grade 24/7 support
●Pricing
Search or jump to...
Clear
Search syntax tips
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
To see all available qualifiers, see our documentation.
Appearance settings
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
github
/
codeql
Public
●
Notifications
You must be signed in to change notification settings
●
Fork
1.9k
Star
9.1k
●
Code
●
Issues
917
●
Pull requests
370
●
Discussions
●
Actions
●
Projects
0
●
Models
●
Security
Uh oh!
There was an error while loading. Please reload this page.
●
Insights
Additional navigation options
●
Code
●
Issues
●
Pull requests
●
Discussions
●
Actions
●
Projects
●
Models
●
Security
●
Insights
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.
Sign up for GitHub
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
Jump to bottom
Merged
michaelnebel
merged 12 commits into
github:main
from
michaelnebel:csharp/line-pragma
Jan 20, 2022
Merged
michaelnebel
merged 12 commits into
github:main
from
michaelnebel:csharp/line-pragma
Jan 20, 2022
Files changed
Uh oh!
There was an error while loading. Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
Contributor
C# 10 introduced a new #line pragma, where it is possible to specify, how start and end (line and column) including an offset should be printed, when a compiler warning is issued.
In the PR we
●Introduce support for the new construct
●Include some testcases
●Make some minor refactoring to avoid magic numbers (introducing an enum for #line kind)
●Update stats to include the new tables (unfortunately they are empty).
Sorry, something went wrong.
github-actions
bot
added
the
C#
label
Jan 12, 2022
michaelnebel
force-pushed
the
csharp/line-pragma
branch
from
8df9b2btoe75b38e
Compare
January 17, 2022 08:20
michaelnebel
added 11commits
January 18, 2022 09:32
C#: Add new tables to the dbscheme line span pragma.
c9467d7
C#: Add shared base class for line and line span pragmas.
a197bef
C#: Add new class needed for LineSpanDirective and modify existing im…
195d40c
…plementation to use the new types.
C#: Add support in the extractor for the LineSpanDirective.
af380f8
C#: Refator directive visitor to use expression body.
7e26466
C#: Add QL library support for the Line span directive.
93255df
C#: Add line span pragma example.
8b048ca
C#: Add Line span pragma test case.
ac47c96
C#: Add upgrade scripts for the new tables requires for the line span…
8fd116f
… pragma.
C#: Add downgrade scripts for the line span pragma.
bf21026
C#: Update stats file for the new relations (they are unfortunately e…
de3d62b
…mpty).
michaelnebel
force-pushed
the
csharp/line-pragma
branch
from
c5efd30tode3d62b
Compare
January 18, 2022 08:33
michaelnebel
marked this pull request as ready for review
January 18, 2022 08:38
michaelnebel
requested a review
from a team
as a code owner
January 18, 2022 08:38
Contributor
Author
michaelnebel
commented
|
Need to also look into the SourceLocation stuff (forgot that). Will write something here, when investigation is finished.
|
Sorry, something went wrong.
Contributor
Author
michaelnebel
commented
Need to also look into the SourceLocation stuff (forgot that). Will write something here, when investigation is finished.
Tried to do some dev testing of this and looks like it is working out of the box.
query predicate elements(Assignment statement, File f) { statement.getLocation().getFile() = f }
Which among other things produced the output
| LinePragmasRef1.cs:1:9:1:13 | Int32 i = ... | LinePragmasRef1.cs:0:0:0:0 | LinePragmasRef1.cs |
| LinePragmasRef2.cs:2:13:2:17 | Int32 j = ... | LinePragmasRef2.cs:0:0:0:0 | LinePragmasRef2.cs |
and it looks like this respects the line span pragma info.
|
Sorry, something went wrong.
Contributor
Author
michaelnebel
commented
Sorry, something went wrong.
tamasvajk
reviewed
Jan 19, 2022
View reviewed changes
csharp/ql/lib/semmle/code/csharp/Preprocessor.qll
Outdated
Show resolved
Hide resolved
Uh oh!
There was an error while loading. Please reload this page.
hvitved
requested changes
Jan 19, 2022
View reviewed changes
Contributor
hvitved
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approach LGTM.
Sorry, something went wrong.
...rp/extractor/Semmle.Extraction.CSharp/Entities/PreprocessorDirectives/LineOrSpanDirective.cs
Show resolved
Hide resolved
Uh oh!
There was an error while loading. Please reload this page.
csharp/extractor/Semmle.Extraction.CSharp/Entities/PreprocessorDirectives/LineSpanDirective.cs
Show resolved
Hide resolved
Uh oh!
There was an error while loading. Please reload this page.
csharp/extractor/Semmle.Extraction.CSharp/Entities/PreprocessorDirectives/LineSpanDirective.cs
Outdated
Show resolved
Hide resolved
Uh oh!
There was an error while loading. Please reload this page.
csharp/ql/lib/semmle/code/csharp/Preprocessor.qll
Outdated
Show resolved
Hide resolved
Uh oh!
There was an error while loading. Please reload this page.
C#: Address review comments.
d7cd1cf
hvitved
approved these changes
Jan 19, 2022
View reviewed changes
Contributor
hvitved
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Then we just need a final DCA run, since the stats have been updated.
Sorry, something went wrong.
Contributor
Author
michaelnebel
commented
LGTM. Then we just need a final DCA run, since the stats have been updated.
Great! I will start one.
|
Sorry, something went wrong.
Contributor
Author
michaelnebel
commented
|
Execution times are looking good. Merging now.
|
Sorry, something went wrong.
michaelnebel
merged commit 547f492
into
github:main
Jan 20, 2022
michaelnebel
deleted the
csharp/line-pragma
branch
January 20, 2022 08:52
michaelnebel
mentioned this pull request
Jan 25, 2022
C#: Add change notes for the already implemented C# 10 features.
#7730
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hvitved
hvitved approved these changes
Reviewers whose approvals may not affect merge requirements
No one assigned
C#
No milestone
Successfully merging this pull request may close these issues.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Footer
© 2026 GitHub, Inc.
●
Terms
●
Privacy
●
Security
●
Status
●
Community
●
Docs
●
Contact
●
●
ation
You can’t perform that action at this time.