Skip to content

Commit

Permalink
Added GitInformation project files.
Browse files Browse the repository at this point in the history
Moved the project files to Elskom.GitInformation over to this repository.

Signed-off-by: AraHaan <seandhunt_7@yahoo.com>
  • Loading branch information
AraHaan committed May 26, 2021
1 parent 1b99b65 commit 5d9485d
Show file tree
Hide file tree
Showing 25 changed files with 707 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -452,3 +452,4 @@ $RECYCLE.BIN/
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
GitInfo.json
34 changes: 32 additions & 2 deletions GitBuildInfo.SourceGenerator.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.6.30114.105
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitBuildInfo.SourceGenerator", "src/GitBuildInfo.SourceGenerator.csproj", "{D769E982-58EE-436B-B2A8-C35D4D55BA8D}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitBuildInfo.SourceGenerator", "src/GitBuildInfo.SourceGenerator/GitBuildInfo.SourceGenerator.csproj", "{D769E982-58EE-436B-B2A8-C35D4D55BA8D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{99761A41-8AED-49B5-AF0F-CF6CCAE482E8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{B84AD34C-E5C4-418F-A58A-195C9F89A961}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitBuildInfo.SourceGenerator.Tests", "tests/GitBuildInfo.SourceGenerator.Tests.csproj", "{5A9FCC65-752B-499B-A86B-ABCC6F4666D9}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitBuildInfo.SourceGenerator.Tests", "tests/GitBuildInfo.SourceGenerator.Tests/GitBuildInfo.SourceGenerator.Tests.csproj", "{5A9FCC65-752B-499B-A86B-ABCC6F4666D9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elskom.GitInformation", "src\Elskom.GitInformation\Elskom.GitInformation.csproj", "{FD675B8D-C607-4007-A7E1-09531F535EE6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elskom.GitInformation.Tests", "tests\Elskom.GitInformation.Tests\Elskom.GitInformation.Tests.csproj", "{42962124-BD04-4699-B386-7F55D240142D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -48,9 +52,35 @@ Global
{5A9FCC65-752B-499B-A86B-ABCC6F4666D9}.Release|x64.Build.0 = Release|Any CPU
{5A9FCC65-752B-499B-A86B-ABCC6F4666D9}.Release|x86.ActiveCfg = Release|Any CPU
{5A9FCC65-752B-499B-A86B-ABCC6F4666D9}.Release|x86.Build.0 = Release|Any CPU
{FD675B8D-C607-4007-A7E1-09531F535EE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FD675B8D-C607-4007-A7E1-09531F535EE6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FD675B8D-C607-4007-A7E1-09531F535EE6}.Debug|x64.ActiveCfg = Debug|Any CPU
{FD675B8D-C607-4007-A7E1-09531F535EE6}.Debug|x64.Build.0 = Debug|Any CPU
{FD675B8D-C607-4007-A7E1-09531F535EE6}.Debug|x86.ActiveCfg = Debug|Any CPU
{FD675B8D-C607-4007-A7E1-09531F535EE6}.Debug|x86.Build.0 = Debug|Any CPU
{FD675B8D-C607-4007-A7E1-09531F535EE6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FD675B8D-C607-4007-A7E1-09531F535EE6}.Release|Any CPU.Build.0 = Release|Any CPU
{FD675B8D-C607-4007-A7E1-09531F535EE6}.Release|x64.ActiveCfg = Release|Any CPU
{FD675B8D-C607-4007-A7E1-09531F535EE6}.Release|x64.Build.0 = Release|Any CPU
{FD675B8D-C607-4007-A7E1-09531F535EE6}.Release|x86.ActiveCfg = Release|Any CPU
{FD675B8D-C607-4007-A7E1-09531F535EE6}.Release|x86.Build.0 = Release|Any CPU
{42962124-BD04-4699-B386-7F55D240142D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{42962124-BD04-4699-B386-7F55D240142D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42962124-BD04-4699-B386-7F55D240142D}.Debug|x64.ActiveCfg = Debug|Any CPU
{42962124-BD04-4699-B386-7F55D240142D}.Debug|x64.Build.0 = Debug|Any CPU
{42962124-BD04-4699-B386-7F55D240142D}.Debug|x86.ActiveCfg = Debug|Any CPU
{42962124-BD04-4699-B386-7F55D240142D}.Debug|x86.Build.0 = Debug|Any CPU
{42962124-BD04-4699-B386-7F55D240142D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{42962124-BD04-4699-B386-7F55D240142D}.Release|Any CPU.Build.0 = Release|Any CPU
{42962124-BD04-4699-B386-7F55D240142D}.Release|x64.ActiveCfg = Release|Any CPU
{42962124-BD04-4699-B386-7F55D240142D}.Release|x64.Build.0 = Release|Any CPU
{42962124-BD04-4699-B386-7F55D240142D}.Release|x86.ActiveCfg = Release|Any CPU
{42962124-BD04-4699-B386-7F55D240142D}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{D769E982-58EE-436B-B2A8-C35D4D55BA8D} = {99761A41-8AED-49B5-AF0F-CF6CCAE482E8}
{5A9FCC65-752B-499B-A86B-ABCC6F4666D9} = {B84AD34C-E5C4-418F-A58A-195C9F89A961}
{FD675B8D-C607-4007-A7E1-09531F535EE6} = {99761A41-8AED-49B5-AF0F-CF6CCAE482E8}
{42962124-BD04-4699-B386-7F55D240142D} = {B84AD34C-E5C4-418F-A58A-195C9F89A961}
EndGlobalSection
EndGlobal
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019-2021 Els_kom

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
149 changes: 149 additions & 0 deletions src/Elskom.GitInformation/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
# Remove the line below if you want to inherit .editorconfig settings from higher directories
root = true

# C# files
[*.cs]

#### Core EditorConfig Options ####

# Indentation and spacing
indent_size = 4
indent_style = space
tab_width = 4

# New line preferences
end_of_line = crlf
insert_final_newline = false

#### .NET Coding Conventions ####

# this. and Me. preferences
dotnet_style_qualification_for_event = true:warning
dotnet_style_qualification_for_field = true:warning
dotnet_style_qualification_for_method = true:warning
dotnet_style_qualification_for_property = true:warning

# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
dotnet_style_predefined_type_for_member_access = true:warning

# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning

# Modifier preferences
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent

# Expression-level preferences
csharp_style_deconstructed_variable_declaration = true:warning
csharp_style_inlined_variable_declaration = true:warning
csharp_style_throw_expression = true:warning
dotnet_style_coalesce_expression = true:warning
dotnet_style_collection_initializer = true:warning
dotnet_style_explicit_tuple_names = true:warning
dotnet_style_null_propagation = true:warning
dotnet_style_object_initializer = true:warning
dotnet_style_prefer_auto_properties = true:warning
dotnet_style_prefer_compound_assignment = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:warning
dotnet_style_prefer_conditional_expression_over_return = true:warning
dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning
dotnet_style_prefer_inferred_tuple_names = true:warning
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning

# Field preferences
dotnet_style_readonly_field = true:warning

# Parameter preferences
dotnet_code_quality_unused_parameters = all:suggestion

#### C# Coding Conventions ####

# var preferences
csharp_style_var_elsewhere = true:warning
csharp_style_var_for_built_in_types = true:warning
csharp_style_var_when_type_is_apparent = true:warning

# Expression-bodied members
csharp_style_expression_bodied_accessors = true:warning
csharp_style_expression_bodied_constructors = true:warning
csharp_style_expression_bodied_indexers = true:warning
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = true:silent
csharp_style_expression_bodied_methods = true:warning
csharp_style_expression_bodied_operators = true:warning
csharp_style_expression_bodied_properties = true:warning

# Pattern matching preferences
csharp_style_pattern_matching_over_as_with_null_check = true:warning
csharp_style_pattern_matching_over_is_with_cast_check = true:warning

# Null-checking preferences
csharp_style_conditional_delegate_call = true:warning

# Modifier preferences
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async

# Code-block preferences
csharp_prefer_braces = true:warning

# Expression-level preferences
csharp_prefer_simple_default_expression = true:warning
csharp_style_pattern_local_over_anonymous_function = true:warning
csharp_style_prefer_index_operator = true:suggestion
csharp_style_prefer_range_operator = true:suggestion
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
csharp_style_unused_value_expression_statement_preference = discard_variable:silent

#### C# Formatting Rules ####

# New line preferences
csharp_new_line_before_catch = true
csharp_new_line_before_else = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_open_brace = all
csharp_new_line_between_query_expression_clauses = true

# Indentation preferences
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = false
csharp_indent_labels = one_less_than_current
csharp_indent_switch_labels = true

# Space preferences
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = false
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false

# Wrapping preferences
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true


# CA1307: Specify StringComparison
dotnet_diagnostic.CA1307.severity = warning
3 changes: 3 additions & 0 deletions src/Elskom.GitInformation/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Project>
<Import Project="../../build/GitBuildInfo.SourceGenerator.props" />
</Project>
3 changes: 3 additions & 0 deletions src/Elskom.GitInformation/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Project>
<Import Project="../../build/GitBuildInfo.SourceGenerator.targets" />
</Project>
82 changes: 82 additions & 0 deletions src/Elskom.GitInformation/Elskom.GitInformation.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<Project Sdk="PublishRefAssemblies.Sdk/1.0.3">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Elskom.GitInformation</AssemblyName>
<LangVersion>latest</LangVersion>
<Company>Els_kom org.</Company>
<Authors>Els_kom org.</Authors>
<PackageTags>GitBuildInformation</PackageTags>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/Elskom/GitBuildInfo.SourceGenerator/</RepositoryUrl>
<PackageProjectUrl>https://github.com/Elskom/GitBuildInfo.SourceGenerator/</PackageProjectUrl>
<PackageOutputPath>$(MSBuildThisFileDirectory)..\..\artifacts\</PackageOutputPath>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Copyright>Copyright (c) 2019-2021</Copyright>
<Description>A c# library that Registers git repository information on the assembly.</Description>
<PackageReleaseNotes>Initial Release.</PackageReleaseNotes>
<Version>1.0.0</Version>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<NeutralLanguage>en-US</NeutralLanguage>
<NoWarn>$(NoWarn);NU5104;NU5118</NoWarn>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Elskom.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
<!-- Optional: Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<!-- Optional: Embed source files that are not tracked by the source control manager in the PDB -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!-- Optional: Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
<!-- <IncludeSymbols>true</IncludeSymbols> -->
<!-- Optional: Include source code in the symbol package (.snupkg) -->
<!-- <IncludeSource>true</IncludeSource> -->
<!-- <IncludeBuildOutput>true</IncludeBuildOutput> -->
<!-- <SymbolPackageFormat>snupkg</SymbolPackageFormat> -->
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>
<!-- suppress message when using the .NET Preview SDKs. -->
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
<!--
Sorry, we have to disable the warning for adding the reference assemblies to the package without adding them to the nuspec.
This is because of the fact that if we use the methods to add them that does add them to the nuspec, then the folder paths
would be added automatically to the project which is not intended at all or even wanted. As such for now the only way to
fix that is to disable package analysis for now.
-->
<NoPackageAnalysis Condition="'$(PublishReferenceAssemblies)' == 'true'">true</NoPackageAnalysis>
<DefineConstants Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">$(DefineConstants);DEBUG;TRACE</DefineConstants>
</PropertyGroup>

<ItemGroup>
<AdditionalFiles Include="stylecop.json" />
<PackageReference Include="SecurityCodeScan.VS2019" Version="*-*">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="SonarAnalyzer.CSharp" Version="*-*">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="*-*">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="IDisposableAnalyzers" Version="*-*">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="ReflectionAnalyzers" Version="*-*">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<!-- SourceLink -->
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="*-*">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<!-- Common .NET Dependency packages. -->
<!-- For Span/ReadOnlySpan. -->
<PackageReference Include="System.Memory" Version="*-*" />
<ProjectReference Include="../GitBuildInfo.SourceGenerator/GitBuildInfo.SourceGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>

</Project>
Loading

0 comments on commit 5d9485d

Please sign in to comment.