Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ChangeSharp.Cli/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
string category = ChooseCategory(parseResult, o, allowMajor, anyFlagCategory, mappedCategory, out int? categoryError);
if (categoryError.HasValue) return categoryError.Value;

int result = TryAppendFragment(o, message, category, allowMajor, anyFlagCategory, separate, fragmentTarget, changelistName);

Check warning on line 157 in ChangeSharp.Cli/Program.cs

View workflow job for this annotation

GitHub Actions / api-surface

Possible null reference argument for parameter 'message' in 'int Program.TryAppendFragment(Output o, string message, string category, bool allowMajor, bool anyFlagCategory, bool separate, string? fragmentTarget, string? changelistName)'.

Check warning on line 157 in ChangeSharp.Cli/Program.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'message' in 'int Program.TryAppendFragment(Output o, string message, string category, bool allowMajor, bool anyFlagCategory, bool separate, string? fragmentTarget, string? changelistName)'.

Check warning on line 157 in ChangeSharp.Cli/Program.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'message' in 'int Program.TryAppendFragment(Output o, string message, string category, bool allowMajor, bool anyFlagCategory, bool separate, string? fragmentTarget, string? changelistName)'.
if (result != RetryInteractive)
return result;
}
Expand All @@ -169,6 +169,8 @@

if (messageFile != null)
{
if (messageFile.Contains(".."))
return (null, o.Err("Invalid file path", ExitCodeGenericError));
if (!File.Exists(messageFile))
return (null, o.Err($"File not found: {messageFile}", ExitCodeGenericError));
return (File.ReadAllText(messageFile).Trim(), null);
Expand Down Expand Up @@ -613,13 +615,13 @@
var shortNames = manager.ListFragmentFiles().Select(Path.GetFileName).ToArray();

if (list)
return ShowFragmentList(o, shortNames);

Check warning on line 618 in ChangeSharp.Cli/Program.cs

View workflow job for this annotation

GitHub Actions / api-surface

Argument of type 'string?[]' cannot be used for parameter 'shortNames' of type 'string[]' in 'int Program.ShowFragmentList(Output o, string[] shortNames)' due to differences in the nullability of reference types.

Check warning on line 618 in ChangeSharp.Cli/Program.cs

View workflow job for this annotation

GitHub Actions / build

Argument of type 'string?[]' cannot be used for parameter 'shortNames' of type 'string[]' in 'int Program.ShowFragmentList(Output o, string[] shortNames)' due to differences in the nullability of reference types.

Check warning on line 618 in ChangeSharp.Cli/Program.cs

View workflow job for this annotation

GitHub Actions / build

Argument of type 'string?[]' cannot be used for parameter 'shortNames' of type 'string[]' in 'int Program.ShowFragmentList(Output o, string[] shortNames)' due to differences in the nullability of reference types.

if (all)
return RemoveAllFragments(manager, o, shortNames, yes);

Check warning on line 621 in ChangeSharp.Cli/Program.cs

View workflow job for this annotation

GitHub Actions / api-surface

Argument of type 'string?[]' cannot be used for parameter 'shortNames' of type 'string[]' in 'int Program.RemoveAllFragments(WorkspaceManager manager, Output o, string[] shortNames, bool yes)' due to differences in the nullability of reference types.

Check warning on line 621 in ChangeSharp.Cli/Program.cs

View workflow job for this annotation

GitHub Actions / build

Argument of type 'string?[]' cannot be used for parameter 'shortNames' of type 'string[]' in 'int Program.RemoveAllFragments(WorkspaceManager manager, Output o, string[] shortNames, bool yes)' due to differences in the nullability of reference types.

Check warning on line 621 in ChangeSharp.Cli/Program.cs

View workflow job for this annotation

GitHub Actions / build

Argument of type 'string?[]' cannot be used for parameter 'shortNames' of type 'string[]' in 'int Program.RemoveAllFragments(WorkspaceManager manager, Output o, string[] shortNames, bool yes)' due to differences in the nullability of reference types.

if (fragment == null)
return ShowRemoveUsage(o, shortNames);

Check warning on line 624 in ChangeSharp.Cli/Program.cs

View workflow job for this annotation

GitHub Actions / api-surface

Argument of type 'string?[]' cannot be used for parameter 'shortNames' of type 'string[]' in 'int Program.ShowRemoveUsage(Output o, string[] shortNames)' due to differences in the nullability of reference types.

Check warning on line 624 in ChangeSharp.Cli/Program.cs

View workflow job for this annotation

GitHub Actions / build

Argument of type 'string?[]' cannot be used for parameter 'shortNames' of type 'string[]' in 'int Program.ShowRemoveUsage(Output o, string[] shortNames)' due to differences in the nullability of reference types.

Check warning on line 624 in ChangeSharp.Cli/Program.cs

View workflow job for this annotation

GitHub Actions / build

Argument of type 'string?[]' cannot be used for parameter 'shortNames' of type 'string[]' in 'int Program.ShowRemoveUsage(Output o, string[] shortNames)' due to differences in the nullability of reference types.

return RemoveSingleFragment(manager, o, fragment);
}
Expand Down
Loading