C#: Implement support for path transformers#4212
Merged
Merged
Conversation
b3a03f4 to
4c5c7d5
Compare
Implements the specification at https://wiki.semmle.com/display/SDmaster/project-layout+format by compiling file path specifications to regular expressions.
d336a02 to
d4aa276
Compare
d4aa276 to
37f1ce3
Compare
tamasvajk
suggested changes
Sep 7, 2020
tamasvajk
previously approved these changes
Sep 8, 2020
hvitved
commented
Sep 11, 2020
This avoids calling the path transformer for `GeneratedFile`s.
tamasvajk
approved these changes
Sep 14, 2020
Contributor
Author
|
@dave-bartolomeo : Let me know when you have tested these changes, and whether the PR can be merged. |
Closed
dbartol
approved these changes
Sep 21, 2020
dbartol
left a comment
There was a problem hiding this comment.
I've verified that the 1.24-based version of this seems to work for Microsoft, so this is ready for 1.25.1.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.Outdated suggestions cannot be applied.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.
Overview
This PR implements support for path transformers (specified using the
CODEQL_PATH_TRANSFORMERenvironment variable) in the C# extractor. Paths are transformed in the following places:filesrelation.foldersrelation.While it is strictly speaking not needed for TRAP files, it maintains the invariant that each source code file in the source archive is mapped to a
.trap.gzfile at the same relative location.Testing
macOS
I have tested locally on macOS with this transformer file
and this build command
Windows
I have tested locally on Windows with this transformer file
and this build command
Review
Commit-by-commit review is suggested.