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#: Remove legacy odasa support
#8322
Conversation
LGTM. Very nice with some cleanup.
Have added a couple of comments. Nothing that should block a merge.
|
|
||
| SourceArchiveDir = | ||
| Actions.GetEnvironmentVariable($"CODEQL_EXTRACTOR_{this.Options.Language.UpperCaseName}_SOURCE_ARCHIVE_DIR") ?? | ||
| Actions.GetEnvironmentVariable("SOURCE_ARCHIVE") ?? | ||
| throw new InvalidEnvironmentException($"The environment variable CODEQL_EXTRACTOR_{this.Options.Language.UpperCaseName}_SOURCE_ARCHIVE_DIR or SOURCE_ARCHIVE has not been set."); |
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.
SOURCE_ARCHIVE needs to be removed from exception message.
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.
Good spot.
| @@ -70,7 +70,7 @@ public BuildCommand(string exe, string? argumentsOpt, bool silent, string? worki | |||
| this.environment = environment; | |||
| } | |||
|
|
|||
| public override string ToString() => exe + " " + arguments; | |||
| public override string ToString() => arguments.Length > 0 ? exe + " " + arguments : exe; | |||
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.
Maybe use !string.IsNullOrEmpty.
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.
arguments cannot be null (we are using C# 8 nullable reference types), so we only need the emptiness check.
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.
Yes, let's keep it as it is :-)
The following environment variables are no longer supported: ``` ODASA_BUILD_ERROR_DIR ODASA_CSHARP_LAYOUT ODASA_SNAPSHOT SEMMLE_DIST SEMMLE_EXTRACTOR_OPTIONS SEMMLE_PLATFORM_TOOLS SEMMLE_PRESERVE_SYMLINKS SOURCE_ARCHIVE TRAP_FOLDER ```
|
Rebased to resolve merge conflict. |
The following environment variables are no longer supported: