Skip to content

Commit

Permalink
Update config (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gitii authored Jun 12, 2022
1 parent 1c6e874 commit 17d1fb3
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"csharpier": {
"version": "0.14.0",
"version": "0.16.0",
"commands": ["dotnet-csharpier"]
},
"packedprettier": {
Expand Down
21 changes: 14 additions & 7 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ dotnet_style_readonly_field = true:suggestion
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_null_propagation =true:error
dotnet_style_coalesce_expression =true:error
dotnet_style_null_propagation = true:error
dotnet_style_coalesce_expression = true:error
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
Expand All @@ -67,7 +67,7 @@ dotnet_naming_style.pascal_case_style.capitalization = pascal_case
# Use PascalCase for constant fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
dotnet_naming_symbols.constant_fields.applicable_kinds = field
dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
dotnet_naming_symbols.constant_fields.required_modifiers = const
Expand All @@ -76,7 +76,9 @@ dotnet_diagnostic.CA1823.severity=error
dotnet_diagnostic.CA1836.severity=error
dotnet_style_namespace_match_folder=true:error
dotnet_style_allow_multiple_blank_lines_experimental=true:error
dotnet_diagnostic.VSTHRD111.severity=error
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 4
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
###############################
# C# Coding Conventions #
###############################
Expand All @@ -101,7 +103,7 @@ csharp_style_conditional_delegate_call = true:suggestion
# Modifier preferences
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
# Expression-level preferences
csharp_prefer_braces =true:error
csharp_prefer_braces = true:error
csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_prefer_simple_default_expression = true:suggestion
csharp_style_pattern_local_over_anonymous_function = true:suggestion
Expand Down Expand Up @@ -155,7 +157,7 @@ dotnet_diagnostic.VSTHRD200.severity = error
dotnet_diagnostic.MA0048.severity = error

# MA0004: Use Task.ConfigureAwait(false)
dotnet_diagnostic.MA0004.severity =silent
dotnet_diagnostic.MA0004.severity = error

# CS8618: Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
dotnet_diagnostic.CS8618.severity = error
Expand All @@ -171,8 +173,13 @@ dotnet_diagnostic.MA0044.severity=error

# VSTHRD001: Avoid legacy thread switching APIs
dotnet_diagnostic.VSTHRD001.severity = none
csharp_style_namespace_declarations=file_scoped:error
csharp_style_namespace_declarations= file_scoped:error
csharp_style_unused_value_assignment_preference=discard_variable:error
csharp_using_directive_placement = outside_namespace:silent
csharp_prefer_simple_using_statement = true:suggestion
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent

[*.vb]
# Modifier preferences
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
uses: softprops/action-gh-release@v1
with:
files: "./nuget/*.nupkg"
prerelease: ${{ endsWith(steps.tagName.outputs.tag, '[-][\w\d]+') }}
prerelease: ${{ contains(steps.tagName.outputs.tag, '-') }}
- name: Push packages to Nuget registry
run: dotnet nuget push $(Get-ChildItem -Path ./nuget -Filter "*.nupkg").FullName --source "https://api.nuget.org/v3/index.json" --api-key "$env:NUGET_API_KEY" --skip-duplicate
env:
Expand Down
41 changes: 3 additions & 38 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

/wsl-sdk-dotnet

# User-specific files
*.rsuser
*.suo
Expand All @@ -23,7 +25,6 @@ mono_crash.*
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
Expand Down Expand Up @@ -62,9 +63,6 @@ project.lock.json
project.fragment.lock.json
artifacts/

# ASP.NET Scaffolding
ScaffoldingReadMe.txt

# StyleCop
StyleCopReport.xml

Expand All @@ -90,7 +88,6 @@ StyleCopReport.xml
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
Expand Down Expand Up @@ -147,7 +144,6 @@ coverage*.json
coverage*.xml
coverage*.info
CoverageReport

# Visual Studio code coverage results
*.coverage
*.coveragexml
Expand Down Expand Up @@ -185,7 +181,7 @@ publish/
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
# *.pubxml # <- should be included!
*.pubxml
*.publishproj

# Microsoft Azure Web App publish settings. Comment the next line if you want to
Expand All @@ -207,9 +203,6 @@ PublishScripts/
*.nuget.props
*.nuget.targets

# Nuget personal access tokens and Credentials
nuget.config

# Microsoft Azure Build Output
csx/
*.build.csdef
Expand Down Expand Up @@ -362,31 +355,3 @@ MigrationBackup/

# Ionide (cross platform F# VS Code tools) working folder
.ionide/

# Fody - auto-generated XML schema
FodyWeavers.xsd

# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
.history/

# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp

# JetBrains Rider
.idea/
*.sln.iml

runtimes
ref
17 changes: 16 additions & 1 deletion .onsaveconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
# run dotnet csharpier on C# files, whenever they're saved.
[*.cs]
command = dotnet
arguments = csharpier "{file}"
always_run = true

[*.{js,ts,css,less,scss,vue,json,gql,md,yml,yaml,html,htm}]
command = dotnet
arguments = pprettier --write "{file}"
always_run = true

[*.{xml,csproj,xaml,appxmanifest,props,wapproj}]
command = dotnet
arguments = pprettier --write "{file}" --plugin "<NodeModulesPath>/@prettier/plugin-xml" --parser "xml" --print-width 120 --xml-whitespace-sensitivity "ignore" --tab-width 4
always_run = true

[*.sh]
command = dotnet
arguments = pprettier --write "{file}" --plugin "<NodeModulesPath>/prettier-plugin-sh"
always_run = true
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bin/
obj/
.vs/
.git/
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Meziantou.Analyzer" Version="1.0.688">
<PackageReference Include="Meziantou.Analyzer" Version="1.0.702">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.0.64">
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.2.32">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="AsyncFixer" Version="1.5.1">
<PackageReference Include="AsyncFixer" Version="1.6.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down

0 comments on commit 17d1fb3

Please sign in to comment.