Skip to content

Commit 21df78a

Browse files
nwithan8jchen293
andauthored
Linting the whole project (#192)
* - Added docstrings for all public methods - Fixed spelling errors - Standardized verbiage and formatting * - Basic line spacing and white space auto-formatting (via IDE) * - Bump copyright year * - Added copyright headers to all .cs files * - Remove unused imports * - Note that RootElement is obselete: restsharp/RestSharp#1258 * - Fix things lost in master rebase * - Fix spacing - Use generic "var" for local variable declaration - Fix some local variables overloading class variables * - Created .editorconfig file. This is an export of the styling rules used by the IDE during auto-styling. This can be utilized by other IDEs and by plugins to enforce styling rules. * - Updated .editorconfig to use dotnet's default configuration: https://github.com/dotnet/runtime/blob/main/.editorconfig * - Added LayoutExample.cs file as example of stylistic order of a Class file - Added layout_rules.xml, contains C# file layout rules, can be utilized by ReSharper or Rider * - Applied layout rules to all classes and test files - Removed #pragma annotations, interferred with layout rule application - Fixed header, applied via IDE header creation tool - General spacing cleanup * - Fixed Address function * - Replaced explicit types with generic "var" * - Remove unused Tuple.cs in EasyPost.Net35 * - Fixed spacing setting in .editorconfig, so properties won't have a new line around them - Removed new line around properties in all .cs files - Fixed var setting in .editorconfig, so variables will use explicit type declaration - Old vars replaced with explicit types - Fixed some backwards get/set orders * - Removed excessive new lines * - Add comment explaining LayoutExample.cs * - Change file header template in .editorconfig to remove copyright year - Change headers in all files * - Reset copyright date to first year of release * - Fix copyright date style in LICENSE * - Remove header template from .editorconfig - Remove header from all files - Replace generic "var" with explicit types in tests * - Applied layout rules to all classes and test files - Removed #pragma annotations, interferred with layout rule application - Fixed header, applied via IDE header creation tool - General spacing cleanup * - Replaced explicit types with generic "var" * - Fixed spacing setting in .editorconfig, so properties won't have a new line around them - Removed new line around properties in all .cs files - Fixed var setting in .editorconfig, so variables will use explicit type declaration - Old vars replaced with explicit types - Fixed some backwards get/set orders * - Add TimeoutTest into version-specific test suites * - Replace generic "var" with explicit types in test files * - Cleaned up Client.cs post-rebase - Refactored ConnectTimeoutMilliseconds and RequestTimeoutMilliseconds to be properties, take advantage of built-in C# setters/getters * - Fix spacing in UserTest.cs * improve the CI build. (#193) * improve the CI build. * rollback to windows-2019. * ignore two unit tests that have multiple live api call operations. * add new line between unit tests. * - Basic line spacing and white space auto-formatting (via IDE) * - Applied layout rules to all classes and test files - Removed #pragma annotations, interferred with layout rule application - Fixed header, applied via IDE header creation tool - General spacing cleanup * - Fix generic "var" in commented-out tests * - Remove straggling headers, quick auto-reformat * - Fix bad spacing Co-authored-by: jchen293 <[email protected]>
1 parent 5d251c1 commit 21df78a

File tree

95 files changed

+4095
-2622
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+4095
-2622
lines changed

.editorconfig

Lines changed: 435 additions & 0 deletions
Large diffs are not rendered by default.

EasyPost.Net35/EasyPost.Net35.csproj

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"/>
44
<PropertyGroup>
55
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -11,7 +11,7 @@
1111
<AssemblyName>EasyPost.Net35</AssemblyName>
1212
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
14-
<TargetFrameworkProfile />
14+
<TargetFrameworkProfile/>
1515
</PropertyGroup>
1616
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1717
<DebugSymbols>true</DebugSymbols>
@@ -60,12 +60,12 @@
6060
<HintPath>..\packages\RestSharpSigned.105.2.3\lib\net35\RestSharp.dll</HintPath>
6161
<Private>True</Private>
6262
</Reference>
63-
<Reference Include="System" />
64-
<Reference Include="System.Core" />
65-
<Reference Include="System.Xml.Linq" />
66-
<Reference Include="System.Data.DataSetExtensions" />
67-
<Reference Include="System.Data" />
68-
<Reference Include="System.Xml" />
63+
<Reference Include="System"/>
64+
<Reference Include="System.Core"/>
65+
<Reference Include="System.Xml.Linq"/>
66+
<Reference Include="System.Data.DataSetExtensions"/>
67+
<Reference Include="System.Data"/>
68+
<Reference Include="System.Xml"/>
6969
</ItemGroup>
7070
<ItemGroup>
7171
<Compile Include="..\EasyPost\Address.cs">
@@ -185,7 +185,7 @@
185185
<Compile Include="..\EasyPost\TrackingLocation.cs">
186186
<Link>TrackingLocation.cs</Link>
187187
</Compile>
188-
<Compile Include="Properties\AssemblyInfo.cs" />
188+
<Compile Include="Properties\AssemblyInfo.cs"/>
189189
<Compile Include="..\EasyPost\VersionInfo.cs">
190190
<Link>VersionInfo.cs</Link>
191191
</Compile>
@@ -216,16 +216,15 @@
216216
<Compile Include="..\EasyPost\Error.cs">
217217
<Link>Error.cs</Link>
218218
</Compile>
219-
<Compile Include="Tuple.cs" />
220219
</ItemGroup>
221220
<ItemGroup>
222221
<None Include="..\EasyPost\EasyPost.pfx">
223222
<Link>EasyPost.pfx</Link>
224223
</None>
225-
<None Include="packages.config" />
224+
<None Include="packages.config"/>
226225
</ItemGroup>
227-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
228-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
226+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets"/>
227+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
229228
Other similar extension points exist, see Microsoft.Common.targets.
230229
<Target Name="BeforeBuild">
231230
</Target>

EasyPost.Net35/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.Reflection;
2-
using System.Runtime.CompilerServices;
32
using System.Runtime.InteropServices;
43

54
// General Information about an assembly is controlled through the following

EasyPost.Net35/Tuple.cs

Lines changed: 0 additions & 15 deletions
This file was deleted.

EasyPost.Net35/packages.config

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
2+
23
<packages>
3-
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net35" />
4-
<package id="RestSharpSigned" version="105.2.3" targetFramework="net35" />
5-
</packages>
4+
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net35"/>
5+
<package id="RestSharpSigned" version="105.2.3" targetFramework="net35"/>
6+
</packages>

EasyPost.Net40/EasyPost.Net40.csproj

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"/>
44
<PropertyGroup>
55
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -11,7 +11,7 @@
1111
<AssemblyName>EasyPost.Net40</AssemblyName>
1212
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
14-
<TargetFrameworkProfile />
14+
<TargetFrameworkProfile/>
1515
</PropertyGroup>
1616
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1717
<DebugSymbols>true</DebugSymbols>
@@ -60,13 +60,13 @@
6060
<HintPath>..\packages\RestSharpSigned.105.2.3\lib\net4\RestSharp.dll</HintPath>
6161
<Private>True</Private>
6262
</Reference>
63-
<Reference Include="System" />
64-
<Reference Include="System.Core" />
65-
<Reference Include="System.Xml.Linq" />
66-
<Reference Include="System.Data.DataSetExtensions" />
67-
<Reference Include="Microsoft.CSharp" />
68-
<Reference Include="System.Data" />
69-
<Reference Include="System.Xml" />
63+
<Reference Include="System"/>
64+
<Reference Include="System.Core"/>
65+
<Reference Include="System.Xml.Linq"/>
66+
<Reference Include="System.Data.DataSetExtensions"/>
67+
<Reference Include="Microsoft.CSharp"/>
68+
<Reference Include="System.Data"/>
69+
<Reference Include="System.Xml"/>
7070
</ItemGroup>
7171
<ItemGroup>
7272
<Compile Include="..\EasyPost\Address.cs">
@@ -186,7 +186,7 @@
186186
<Compile Include="..\EasyPost\TrackingLocation.cs">
187187
<Link>TrackingLocation.cs</Link>
188188
</Compile>
189-
<Compile Include="Properties\AssemblyInfo.cs" />
189+
<Compile Include="Properties\AssemblyInfo.cs"/>
190190
<Compile Include="..\EasyPost\VersionInfo.cs">
191191
<Link>VersionInfo.cs</Link>
192192
</Compile>
@@ -222,13 +222,13 @@
222222
<None Include="..\EasyPost\EasyPost.pfx">
223223
<Link>EasyPost.pfx</Link>
224224
</None>
225-
<None Include="packages.config" />
225+
<None Include="packages.config"/>
226226
</ItemGroup>
227227
<ItemGroup>
228-
<WCFMetadata Include="Service References\" />
228+
<WCFMetadata Include="Service References\"/>
229229
</ItemGroup>
230-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
231-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
230+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets"/>
231+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
232232
Other similar extension points exist, see Microsoft.Common.targets.
233233
<Target Name="BeforeBuild">
234234
</Target>

EasyPost.Net40/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.Reflection;
2-
using System.Runtime.CompilerServices;
32
using System.Runtime.InteropServices;
43

54
// General Information about an assembly is controlled through the following

EasyPost.Net40/packages.config

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
2+
23
<packages>
3-
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net40" />
4-
<package id="RestSharpSigned" version="105.2.3" targetFramework="net40" />
5-
</packages>
4+
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net40"/>
5+
<package id="RestSharpSigned" version="105.2.3" targetFramework="net40"/>
6+
</packages>

EasyPost.NetCore20/EasyPost.NetCore20.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,10 @@
195195
<None Include="..\EasyPost\EasyPost.pfx">
196196
<Link>EasyPost.pfx</Link>
197197
</None>
198-
<None Include="packages.config" />
198+
<None Include="packages.config"/>
199199
</ItemGroup>
200200
<ItemGroup>
201-
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
202-
<PackageReference Include="RestSharp" Version="106.13.0" />
201+
<PackageReference Include="Newtonsoft.Json" Version="11.0.2"/>
202+
<PackageReference Include="RestSharp" Version="106.13.0"/>
203203
</ItemGroup>
204204
</Project>

EasyPost.NetCore31/EasyPost.NetCore31.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,10 @@
195195
<None Include="..\EasyPost\EasyPost.pfx">
196196
<Link>EasyPost.pfx</Link>
197197
</None>
198-
<None Include="packages.config" />
198+
<None Include="packages.config"/>
199199
</ItemGroup>
200200
<ItemGroup>
201-
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
202-
<PackageReference Include="RestSharp" Version="106.13.0" />
201+
<PackageReference Include="Newtonsoft.Json" Version="11.0.2"/>
202+
<PackageReference Include="RestSharp" Version="106.13.0"/>
203203
</ItemGroup>
204204
</Project>

0 commit comments

Comments
 (0)