Skip to content

Commit

Permalink
Reworked solution layout (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mpdreamz authored May 15, 2020
1 parent 48f107f commit 86a9670
Show file tree
Hide file tree
Showing 29 changed files with 1,146 additions and 715 deletions.
52 changes: 29 additions & 23 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ trim_trailing_whitespace=true
insert_final_newline=true

[*]
indent_style = space
indent_style = tab
indent_size = 4

[*.cshtml]
indent_style = space
indent_style = tab
indent_size = 4

[*.{fs,fsx}]
[*.{fs,fsx,yml}]
indent_style = space
indent_size = 4

Expand All @@ -28,18 +28,16 @@ indent_size = 2
# currently not supported in Rider/Resharper so not using these for now
# ---


# ---
# langugage conventions https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#language-conventions
# language conventions https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#language-conventions

# Sort using and Import directives with System.* appearing first
dotnet_sort_system_directives_first = true

# Prefer this.X except for _fields
dotnet_style_qualification_for_field = false:none
dotnet_style_qualification_for_property = true:warning
dotnet_style_qualification_for_method = true:warning
dotnet_style_qualification_for_event = true:warning
dotnet_style_qualification_for_field = false:error
dotnet_style_qualification_for_property = false:error
dotnet_style_qualification_for_method = false:error
dotnet_style_qualification_for_event = false:error

# Use language keywords instead of framework type names for type references
dotnet_style_predefined_type_for_locals_parameters_members = true:error
Expand All @@ -49,13 +47,13 @@ dotnet_style_predefined_type_for_member_access = true:error
dotnet_style_object_initializer = true:error
dotnet_style_collection_initializer = true:error
dotnet_style_explicit_tuple_names = true:error
dotnet_style_prefer_inferred_anonymous_type_member_names = true
dotnet_style_prefer_inferred_tuple_names = true
dotnet_style_prefer_inferred_anonymous_type_member_names = true:error
dotnet_style_prefer_inferred_tuple_names = true:error
dotnet_style_coalesce_expression = true:error
dotnet_style_null_propagation = true:error

dotnet_style_require_accessibility_modifiers = for_non_interface_members:error
dotnet_style_readonly_field = true
dotnet_style_readonly_field = true:error

# CSharp code style settings:
[*.cs]
Expand All @@ -64,7 +62,6 @@ csharp_style_var_for_built_in_types = true:error
csharp_style_var_when_type_is_apparent = true:error
csharp_style_var_elsewhere = true:error


csharp_style_expression_bodied_methods = true:error
csharp_style_expression_bodied_constructors = true:error
csharp_style_expression_bodied_operators = true:error
Expand All @@ -82,7 +79,7 @@ csharp_style_throw_expression = true:error
csharp_style_conditional_delegate_call = true:error

csharp_prefer_braces = false:warning
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:error

# ---
# formatting conventions https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#formatting-conventions
Expand All @@ -93,6 +90,8 @@ csharp_new_line_before_else = true:error
csharp_new_line_before_catch = true:error
csharp_new_line_before_finally = true:error
csharp_new_line_before_members_in_object_initializers = true
# just a suggestion do to our JSON tests that use anonymous types to
# represent json quite a bit (makes copy paste easier).
csharp_new_line_before_members_in_anonymous_types = true:suggestion
csharp_new_line_between_query_expression_clauses = true:error

Expand All @@ -105,13 +104,20 @@ csharp_space_between_method_declaration_parameter_list_parentheses = false:error
csharp_space_between_method_call_parameter_list_parentheses = false:error

#Wrap
csharp_preserve_single_line_statements = true
csharp_preserve_single_line_statements = false:error
csharp_preserve_single_line_blocks = true:error

[{SimpleJson|SynchronizedCollection}.cs]
csharp_style_var_for_built_in_types = false:none
csharp_style_var_when_type_is_apparent = false:none
csharp_style_var_elsewhere = false:none
dotnet_style_predefined_type_for_locals_parameters_members = false:none
dotnet_style_predefined_type_for_member_access = false:none
csharp_prefer_braces = false:none
# Resharper
resharper_csharp_braces_for_lock=required_for_complex
resharper_csharp_braces_for_using=required_for_complex
resharper_csharp_braces_for_while=required_for_complex
resharper_csharp_braces_for_foreach=required_for_complex
resharper_csharp_braces_for_for=required_for_complex
resharper_csharp_braces_for_fixed=required_for_complex
resharper_csharp_braces_for_ifelse=required_for_complex

resharper_csharp_accessor_owner_body=expression_body


resharper_redundant_case_label_highlighting=do_not_show

59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Always be deploying

on:
pull_request:
paths-ignore:
- 'README.md'
- '.editorconfig'
push:
paths-ignore:
- 'README.md'
- '.editorconfig'
branches:
- master
tags:
- "*.*.*"

jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- run: |
git fetch --prune --unshallow --tags
echo exit code $?
git tag --list
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.201'
source-url: https://nuget.pkg.github.com/nullean/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

- run: ./build.sh build -s true
name: Build
- run: ./build.sh generatepackages -s true
name: Generate local nuget packages
- run: ./build.sh validatepackages -s true
name: "validate *.npkg files that were created"
- run: ./build.sh generateapichanges -s true
name: "Inspect public API changes"

- name: publish to github package repository
if: github.event_name == 'push' && startswith(github.ref, 'refs/heads')
shell: bash
run: |
until dotnet nuget push build/output/*.nupkg -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate --no-symbols true; do echo "Retrying"; sleep 1; done;
- run: ./build.sh generatereleasenotes -s true
name: Generate release notes for tag
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags')
- run: ./build.sh createreleaseongithub -s true --token ${{secrets.GITHUB_TOKEN}}
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags')
name: Create or update release for tag on github

- run: dotnet nuget push build/output/*.nupkg -k ${{secrets.NUGET_ORG_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols true
name: release to nuget.org
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags')
71 changes: 58 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.local.xml
*.sln.docstates
*.obj
*.swp
*.exe
*.pdb
*.user
Expand All @@ -19,23 +20,67 @@
*.cache
*.ilk
*.log

[Bb]in/
*.nupkg
*.ncrunchsolution
[Bb]in
[Dd]ebug/
[Oo]bj/

test-results
test-results/*
*.lib
*.sbr
*.DotSettings.user
obj/
_ReSharper*/
_NCrunch*/
[Tt]est[Rr]esult*

.vs/
.vs/*
.fake/*
.fake
packages/*
.idea/
paket.exe
paket-files/*.cached

BenchmarkDotNet.Artifacts
build/*
!build/tools
!build/keys
build/tools/*
!build/tools/sn
!build/tools/sn/*
!build/tools/ilmerge
!build/*.fsx
!build/*.fsx
!build/*.ps1
!build/*.nuspec
!build/*.png
!build/*.targets
!build/scripts

# ReSharper
_ReSharper*/
*.DotSettings

# Nuget packages
/packages
*.nupkg
/dep/Newtonsoft.Json.4.0.2
!docs/build
docs/node_modules
doc/Help

/src/Nest.Tests.Unit/*.ncrunchproject
*.ncrunchproject
Cache
YamlCache
tests.yaml

*.DS_Store
*.sln.ide

launchSettings.json
# https://github.com/elastic/elasticsearch-net/pull/1822#issuecomment-183722698
*.project.lock.json
project.lock.json
.vs
.vs/*

.idea/
*.sln.iml
/src/.vs/restore.dg
# temporary location for doc generation
docs-temp
*.binlog
16 changes: 0 additions & 16 deletions AssemblyRewriter.sln

This file was deleted.

35 changes: 0 additions & 35 deletions AssemblyRewriter/AssemblyResolver.cs

This file was deleted.

Loading

0 comments on commit 86a9670

Please sign in to comment.