Skip to content

Commit

Permalink
Added protection, version upgrade and copyright change (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
masesdevelopers authored Jan 29, 2024
1 parent 0aed1a3 commit c60eaca
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 MASES s.r.l.
Copyright (c) 2024 MASES s.r.l.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion src/documentation/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"_appLogoPath": "images/logo.png",
"_appFaviconPath": "images/favicon.ico",
"_appTitle": "MASES Group website - CLI Parser",
"_appFooter": "<div style=\"text-align: center;\">Copyright © 2023 MASES s.r.l.. | Via San Cesidio 16 - San Valentino in A.C. - PE | P.I. 01932310681</div>",
"_appFooter": "<div style=\"text-align: center;\">Copyright © 2024 MASES s.r.l.. | Via San Cesidio 16 - San Valentino in A.C. - PE | P.I. 01932310681</div>",
"_gitContribute": {

}
Expand Down
9 changes: 6 additions & 3 deletions src/net/CLIParser/ArgumentMetadata.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2023 MASES s.r.l.
* Copyright (c) 2024 MASES s.r.l.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -469,6 +469,7 @@ string IArgumentMetadataHelper.Parameter()

string IArgumentMetadataHelper.DescriptionBuilder(int width)
{
if (width <= 0) width = 80; // set a new default since received one is not Parser.HelpInfo is not correct
Helper.Check();
string description = Helper.Parameter();
description = description.PadRight(Helper.Parser.Settings.DefaultDescriptionPadding, ' ');
Expand Down Expand Up @@ -536,8 +537,10 @@ string IArgumentMetadataHelper.DescriptionBuilder(int width)
StringBuilder builder = new StringBuilder();
while (trimming.Length > width)
{
builder.AppendLine(trimming.Substring(0, width - 2) + "-");
trimming = string.Empty.PadRight(Helper.Parser.Settings.DefaultDescriptionPadding + 2, ' ') + trimming.Remove(0, width - 2);
int cuttingPoint = width - 2;
if (cuttingPoint < 0) cuttingPoint = 0;
builder.AppendLine(trimming.Substring(0, cuttingPoint) + "-");
trimming = string.Empty.PadRight(Helper.Parser.Settings.DefaultDescriptionPadding + 2, ' ') + trimming.Remove(0, cuttingPoint);
}
builder.AppendLine(trimming);

Expand Down
2 changes: 1 addition & 1 deletion src/net/CLIParser/CLIParser.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2023 MASES s.r.l.
* Copyright (c) 2024 MASES s.r.l.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions src/net/CLIParser/CLIParser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<RootNamespace>MASES.CLIParser</RootNamespace>
<Title>CLIParser - a parser for command line interface</Title>
<Description>CLIParser - a parser for command line interface</Description>
<Copyright>Copyright © MASES s.r.l. 2023</Copyright>
<Copyright>Copyright © MASES s.r.l. 2024</Copyright>
<Owners>MASES s.r.l.</Owners>
<Authors>MASES s.r.l.</Authors>
<Company>MASES s.r.l.</Company>
<Version>3.2.0.0</Version>
<Version>3.2.1.0</Version>
<Product>CLIParser</Product>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
Expand Down
2 changes: 1 addition & 1 deletion src/net/CLIParser/InternalConst.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2023 MASES s.r.l.
* Copyright (c) 2024 MASES s.r.l.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion tests/CLIParserTest/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2023 MASES s.r.l.
* Copyright (c) 2024 MASES s.r.l.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit c60eaca

Please sign in to comment.