Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
halgari authored Dec 7, 2023
0 parents commit 2f17f47
Show file tree
Hide file tree
Showing 28 changed files with 1,206 additions and 0 deletions.
77 changes: 77 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
root = true

[*]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 120

# Microsoft .NET properties
csharp_new_line_before_members_in_object_initializers = false
csharp_preferred_modifier_order = public, private, protected, internal, file, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async, required:suggestion
csharp_style_prefer_utf8_string_literals = true:suggestion
csharp_style_var_elsewhere = true:warning
csharp_style_var_for_built_in_types = true:warning
csharp_style_var_when_type_is_apparent = true:warning
dotnet_naming_rule.unity_serialized_field_rule.import_to_resharper = True
dotnet_naming_rule.unity_serialized_field_rule.resharper_description = Unity serialized field
dotnet_naming_rule.unity_serialized_field_rule.resharper_guid = 5f0fdb63-c892-4d2c-9324-15c80b22a7ef
dotnet_naming_rule.unity_serialized_field_rule.severity = warning
dotnet_naming_rule.unity_serialized_field_rule.style = lower_camel_case_style
dotnet_naming_rule.unity_serialized_field_rule.symbols = unity_serialized_field_symbols
dotnet_naming_style.lower_camel_case_style.capitalization = camel_case
dotnet_naming_symbols.unity_serialized_field_symbols.applicable_accessibilities = *
dotnet_naming_symbols.unity_serialized_field_symbols.applicable_kinds =
dotnet_naming_symbols.unity_serialized_field_symbols.resharper_applicable_kinds = unity_serialised_field
dotnet_naming_symbols.unity_serialized_field_symbols.resharper_required_modifiers = instance
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:none
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:none
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:none
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
dotnet_style_qualification_for_event = false:warning
dotnet_style_qualification_for_field = false:warning
dotnet_style_qualification_for_method = false:warning
dotnet_style_qualification_for_property = false:warning
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion

# ReSharper properties
resharper_apply_auto_detected_rules = false
resharper_autodetect_indent_settings = true
resharper_csharp_empty_block_style = together_same_line
resharper_csharp_stick_comment = false
resharper_outdent_statement_labels = true
resharper_show_autodetect_configure_formatting_tip = false
resharper_use_indent_from_vs = false
resharper_wrap_lines = true

# ReSharper inspection severities
resharper_arrange_redundant_parentheses_highlighting = hint
resharper_arrange_type_member_modifiers_highlighting = hint
resharper_arrange_type_modifiers_highlighting = hint
resharper_built_in_type_reference_style_for_member_access_highlighting = hint
resharper_built_in_type_reference_style_highlighting = hint

[*.cs]
indent_size = 4
indent_style = space
tab_width = 4

# CS4014: Task not awaited
dotnet_diagnostic.cs4014.severity = error

# CS8509: Missing switch case for named enum value
dotnet_diagnostic.CS8509.severity = error

# CS824: Missing switch case for unnamed enum value
dotnet_diagnostic.CS8524.severity = none

# Enums should not have duplicate values
dotnet_diagnostic.CA1069.severity = error

[{*.yaml,*.yml}]
indent_style = space
indent_size = 2

[*.csproj]
indent_size = 4
61 changes: 61 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Auto detect text files and perform LF normalization
* text=auto

# Documents
*.md text diff=markdown

# Graphics
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.svg binary

# Scripts (Unix)
*.bash text eol=lf
*.sh text eol=lf
*.zsh text eol=lf

# Scripts (Windows)
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

# Archives
*.7z binary
*.gz binary
*.tar binary
*.tgz binary
*.zip binary

# Code files
*.cs text diff=csharp

# Project files
*.sln text eol=crlf
*.csproj text eol=crlf

*.props text eol=crlf
*.targets text eol=crlf
*.filters text eol=crlf
*.filters text eol=crlf
*.vcxitems text eol=crlf

# Dynamic libraries
*.so binary
*.dylib binary
*.dll binary

# Executables
*.exe binary
*.out binary
*.app binary

# Text files where line endings should be preserved
*.patch -text

# Exclude files from exporting
.gitattributes export-ignore
.gitignore export-ignore
.gitkeep export-ignore
11 changes: 11 additions & 0 deletions .github/workflows/compare-to-meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Compare to meta-repo

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
compare:
uses: Nexus-Mods/NexusMods.App.Meta/.github/workflows/compare-to-meta.yaml@fc9c9eae43a7c70eaa4d66b3717cd9cd35cc2bbb
19 changes: 19 additions & 0 deletions .github/workflows/dotnet-build-and-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: .NET build and test

on:
push:
branches: [ main ]
paths:
- ".github/workflows/dotnet-build-and-test.yaml"
- "src/**"
- "tests/**"
pull_request:
branches: [ main ]
paths:
- ".github/workflows/dotnet-build-and-test.yaml"
- "src/**"
- "tests/**"

jobs:
build-and-test:
uses: Nexus-Mods/NexusMods.App.Meta/.github/workflows/dotnet-build-and-test.yaml@780d2001be902a9523de8331da2c77c687abbddb
22 changes: 22 additions & 0 deletions .github/workflows/mkdocs-build-and-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: MkDocs build and deploy

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- "mkdocs.yml"
- "docs/**"
pull_request:
branches: [ main ]
paths:
- "mkdocs.yml"
- "docs/**"

jobs:
build-and-deploy:
permissions:
contents: read
pages: write
id-token: write
uses: Nexus-Mods/NexusMods.App.Meta/.github/workflows/mkdocs-build-and-deploy.yaml@4dd8819de8ff3d41fb13f1118cdcb28cbfb830cc
13 changes: 13 additions & 0 deletions .github/workflows/update-from-meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Update meta-submodule

on:
workflow_dispatch:
schedule:
- cron: "18 9 * * *"

jobs:
update:
permissions:
pull-requests: write
contents: write
uses: Nexus-Mods/NexusMods.App.Meta/.github/workflows/update-from-meta.yaml@fc9c9eae43a7c70eaa4d66b3717cd9cd35cc2bbb
93 changes: 93 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore

.idea/

# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# Benchmark Results
BenchmarkDotNet.Artifacts/

# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/

# StyleCop
StyleCopReport.xml

# ReSharper
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# TeamCity
_TeamCity*

# DotCover
*.dotCover

# Visual Studio code coverage results
*.coverage
*.coveragexml

# Click-Once directory
publish/

# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets

# 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/

# JetBrains Rider
*.sln.iml
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "extern/meta"]
path = extern/meta
url = [email protected]:Nexus-Mods/NexusMods.App.Meta.git
[submodule "docs/Nexus"]
path = docs/Nexus
url = [email protected]:Nexus-Mods/NexusMods.MkDocsMaterial.Themes.Next.git
26 changes: 26 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<Project>
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<!-- https://github.com/dotnet/sourcelink/tree/main/docs#continuousintegrationbuild -->
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>

<!-- https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/code-generation#deterministic -->
<Deterministic>true</Deterministic>

<!-- https://github.com/dotnet/sourcelink/tree/main/docs#deterministicsourcepaths -->
<DeterministicSourcePaths>true</DeterministicSourcePaths>
</PropertyGroup>

<PropertyGroup>
<!-- SYSLIB1006: Multiple logging methods cannot use the same event ID -->
<NoWarn>$(NoWarn);SYSLIB1006</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2023.*" PrivateAssets="all" />
</ItemGroup>
</Project>
8 changes: 8 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project>
<PropertyGroup>
<Nullable>enable</Nullable>
<LangVersion>11</LangVersion>
<ImplicitUsings>false</ImplicitUsings>
<WarningsAsErrors>Nullable</WarningsAsErrors>
</PropertyGroup>
</Project>
Loading

0 comments on commit 2f17f47

Please sign in to comment.