Skip to content

Commit bfe9b17

Browse files
committed
Initial release
1 parent 576de1c commit bfe9b17

25 files changed

+1363
-0
lines changed

.editorconfig

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Modified version of https://github.com/dotnet/roslyn/blob/d0ca6f34aff907a9cafde9f629397cc153bb94fe/.editorconfig
2+
# Rules documentation https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
3+
4+
# top-most EditorConfig file
5+
root = true
6+
7+
# Don't use tabs for indentation.
8+
[*]
9+
indent_style = tab
10+
trim_trailing_whitespace = true
11+
insert_final_newline = false
12+
# (Please don't specify an indent_size here; that has too many unintended consequences.)
13+
14+
# Code files
15+
[*.{cs,csx,vb,vbx}]
16+
indent_size = 4
17+
18+
# Xml project files
19+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
20+
indent_size = 2
21+
22+
# Xml config files
23+
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
24+
indent_size = 2
25+
26+
# JSON files
27+
[*.json]
28+
indent_size = 2
29+
30+
# JS and TS files
31+
[*.{js,ts}]
32+
indent_size = 2
33+
34+
# Dotnet code style settings:
35+
[*.{cs,vb}]
36+
# Sort using and Import directives with System.* appearing first
37+
dotnet_sort_system_directives_first = true
38+
# Avoid "this." and "Me." if not necessary
39+
dotnet_style_qualification_for_field = true:suggestion
40+
dotnet_style_qualification_for_property = false:suggestion
41+
dotnet_style_qualification_for_method = false:suggestion
42+
dotnet_style_qualification_for_event = false:suggestion
43+
44+
# Use language keywords instead of framework type names for type references
45+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
46+
dotnet_style_predefined_type_for_member_access = true:suggestion
47+
48+
# Suggest more modern language features when available
49+
dotnet_style_object_initializer = true:suggestion
50+
dotnet_style_collection_initializer = true:suggestion
51+
dotnet_style_coalesce_expression = true:suggestion
52+
dotnet_style_null_propagation = true:suggestion
53+
dotnet_style_explicit_tuple_names = true:suggestion
54+
55+
# CSharp code style settings:
56+
[*.cs]
57+
# Prefer "var" everywhere
58+
csharp_style_var_for_built_in_types = false:suggestion
59+
csharp_style_var_when_type_is_apparent = false:suggestion
60+
csharp_style_var_elsewhere = false:suggestion
61+
62+
# Prefer method-like constructs to have a block body
63+
csharp_style_expression_bodied_methods = false:suggestion
64+
csharp_style_expression_bodied_constructors = false:suggestion
65+
csharp_style_expression_bodied_operators = false:suggestion
66+
67+
# Prefer property-like constructs to have an expression-body
68+
csharp_style_expression_bodied_properties = true:suggestion
69+
csharp_style_expression_bodied_indexers = true:suggestion
70+
csharp_style_expression_bodied_accessors = true:suggestion
71+
72+
# Suggest more modern language features when available
73+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
74+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
75+
csharp_style_inlined_variable_declaration = true:suggestion
76+
csharp_style_throw_expression = true:suggestion
77+
csharp_style_conditional_delegate_call = true:suggestion
78+
79+
# Newline settings
80+
csharp_new_line_before_open_brace = all
81+
csharp_new_line_before_else = true
82+
csharp_new_line_before_catch = true
83+
csharp_new_line_before_finally = true
84+
csharp_new_line_before_members_in_object_initializers = true
85+
csharp_new_line_before_members_in_anonymous_types = true

.gitattributes

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain

.gitignore

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
4+
# Visual Studio (>=2015) project-specific, machine local files
5+
.vs/
6+
7+
# User-specific files
8+
*.suo
9+
*.user
10+
*.sln.docstates
11+
*.userprefs
12+
13+
# ignore Xamarin.Android Resource.Designer.cs files
14+
**/*.Droid/**/[Rr]esource.[Dd]esigner.cs
15+
**/*.Android/**/[Rr]esource.[Dd]esigner.cs
16+
**/Android/**/[Rr]esource.[Dd]esigner.cs
17+
**/Droid/**/[Rr]esource.[Dd]esigner.cs
18+
19+
# Xamarin Components
20+
Components/
21+
22+
# Build results
23+
[Dd]ebug/
24+
[Dd]ebugPublic/
25+
[Rr]elease/
26+
x64/
27+
build/
28+
bld/
29+
[Bb]in/
30+
[Oo]bj/
31+
32+
# MSTest test Results
33+
[Tt]est[Rr]esult*/
34+
[Bb]uild[Ll]og.*
35+
36+
#NUNIT
37+
*.VisualState.xml
38+
TestResult.xml
39+
40+
# Build Results of an ATL Project
41+
[Dd]ebugPS/
42+
[Rr]eleasePS/
43+
dlldata.c
44+
45+
*_i.c
46+
*_p.c
47+
*_i.h
48+
*.ilk
49+
*.meta
50+
*.obj
51+
*.pch
52+
*.pdb
53+
*.pgc
54+
*.pgd
55+
*.rsp
56+
*.sbr
57+
*.tlb
58+
*.tli
59+
*.tlh
60+
*.tmp
61+
*.tmp_proj
62+
*.log
63+
*.vspscc
64+
*.vssscc
65+
.builds
66+
*.pidb
67+
*.svclog
68+
*.scc
69+
70+
# Chutzpah Test files
71+
_Chutzpah*
72+
73+
# Visual C++ cache files
74+
ipch/
75+
*.aps
76+
*.ncb
77+
*.opensdf
78+
*.sdf
79+
*.cachefile
80+
81+
# Visual Studio profiler
82+
*.psess
83+
*.vsp
84+
*.vspx
85+
86+
# TFS 2012 Local Workspace
87+
$tf/
88+
89+
# Guidance Automation Toolkit
90+
*.gpState
91+
92+
# ReSharper is a .NET coding add-in
93+
_ReSharper*/
94+
*.[Rr]e[Ss]harper
95+
*.DotSettings.user
96+
97+
# JustCode is a .NET coding addin-in
98+
.JustCode
99+
100+
# TeamCity is a build add-in
101+
_TeamCity*
102+
103+
# DotCover is a Code Coverage Tool
104+
*.dotCover
105+
106+
# NCrunch
107+
*.ncrunch*
108+
_NCrunch_*
109+
.*crunch*.local.xml
110+
111+
# MightyMoose
112+
*.mm.*
113+
AutoTest.Net/
114+
115+
# Web workbench (sass)
116+
.sass-cache/
117+
118+
# Installshield output folder
119+
[Ee]xpress/
120+
121+
# DocProject is a documentation generator add-in
122+
DocProject/buildhelp/
123+
DocProject/Help/*.HxT
124+
DocProject/Help/*.HxC
125+
DocProject/Help/*.hhc
126+
DocProject/Help/*.hhk
127+
DocProject/Help/*.hhp
128+
DocProject/Help/Html2
129+
DocProject/Help/html
130+
131+
# Click-Once directory
132+
publish/
133+
134+
# Publish Web Output
135+
*.[Pp]ublish.xml
136+
*.azurePubxml
137+
138+
# NuGet Packages Directory
139+
packages/
140+
*.nuget.targets
141+
*.lock.json
142+
*.nuget.props
143+
144+
## TODO: If the tool you use requires repositories.config uncomment the next line
145+
#!packages/repositories.config
146+
147+
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
148+
# This line needs to be after the ignore of the build folder (and the packages folder if the line above has been uncommented)
149+
!packages/build/
150+
151+
# Windows Azure Build Output
152+
csx/
153+
*.build.csdef
154+
155+
# Windows Store app package directory
156+
AppPackages/
157+
158+
# Others
159+
sql/
160+
*.Cache
161+
ClientBin/
162+
[Ss]tyle[Cc]op.*
163+
~$*
164+
*~
165+
*.dbmdl
166+
*.dbproj.schemaview
167+
*.pfx
168+
*.publishsettings
169+
node_modules/
170+
.DS_Store
171+
*.bak
172+
173+
# RIA/Silverlight projects
174+
Generated_Code/
175+
176+
# Backup & report files from converting an old project file to a newer
177+
# Visual Studio version. Backup files are not needed, because we have git ;-)
178+
_UpgradeReport_Files/
179+
Backup*/
180+
UpgradeLog*.XML
181+
UpgradeLog*.htm
182+
183+
# SQL Server files
184+
*.mdf
185+
*.ldf
186+
187+
# Business Intelligence projects
188+
*.rdl.data
189+
*.bim.layout
190+
*.bim_*.settings
191+
192+
# Microsoft Fakes
193+
FakesAssemblies/

Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<PropertyGroup>
3+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
4+
</PropertyGroup>
5+
</Project>

Directory.Build.targets

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<PropertyGroup>
3+
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)SpatialFocus.EntityFrameworkCore.Extensions.ruleset</CodeAnalysisRuleSet>
4+
</PropertyGroup>
5+
<ItemGroup>
6+
<PackageReference Include="StyleCop.Analyzers">
7+
<Version>1.1.0-beta009</Version>
8+
<PrivateAssets>all</PrivateAssets>
9+
</PackageReference>
10+
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json">
11+
<Link>stylecop.json</Link>
12+
</AdditionalFiles>
13+
</ItemGroup>
14+
</Project>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RuleSet Name="Rules for SpatialFocus.EntityFrameworkCore.Extensions" ToolsVersion="15.0">
3+
4+
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
5+
<Rule Id="SA1101" Action="None" />
6+
<Rule Id="SA1116" Action="None" />
7+
<Rule Id="SA1117" Action="None" />
8+
<Rule Id="SA1127" Action="None" />
9+
<Rule Id="SA1128" Action="None" />
10+
<Rule Id="SA1600" Action="None" />
11+
<Rule Id="SA1601" Action="None" />
12+
<Rule Id="SA1602" Action="None" />
13+
</Rules>
14+
15+
<!-- Fix for https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA0001.md -->
16+
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp" RuleNamespace="Microsoft.CodeAnalysis.CSharp">
17+
<Rule Id="CS1573" Action="None" />
18+
<Rule Id="CS1591" Action="None" />
19+
</Rules>
20+
21+
</RuleSet>

0 commit comments

Comments
 (0)