Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 32 additions & 74 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,74 +1,32 @@
root = true

[*]
charset = utf-8
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.{yml,props,targets,csproj}]
indent_size = 2

# IDE0079: Remove unnecessary suppression
dotnet_remove_unnecessary_suppression_exclusions = category:ReSharper

# IDE0079: Remove unnecessary suppression
# dotnet_diagnostic.IDE0079.severity = none

# CA2255: The 'ModuleInitializer' attribute should not be used in libraries
dotnet_diagnostic.CA2255.severity = none

# CS8600: Converting null literal or possible null value to non-nullable type.
dotnet_diagnostic.CS8600.severity = error

# CS8601: Possible null reference assignment.
dotnet_diagnostic.CS8601.severity = error

# CS8602: Dereference of a possibly null reference.
dotnet_diagnostic.CS8602.severity = error

# CS8603: Possible null reference return.
dotnet_diagnostic.CS8603.severity = error

# CS8604: Possible null reference argument.
dotnet_diagnostic.CS8604.severity = error

# CS8610: Nullability of reference types in type of parameter doesn't match overridden member.
dotnet_diagnostic.CS8610.severity = error

# CS8613: Nullability of reference types in return type doesn't match implicitly implemented member.
dotnet_diagnostic.CS8613.severity = error

# CS8614: Nullability of reference types in type of parameter doesn't match implicitly implemented member.
dotnet_diagnostic.CS8614.severity = error

# CS8618: Non-nullable field is uninitialized. Consider declaring as nullable.
dotnet_diagnostic.CS8618.severity = error

# CS8619: Nullability of reference types in value doesn't match target type.
dotnet_diagnostic.CS8619.severity = error

# CS8620: Argument cannot be used for parameter due to differences in the nullability of reference types.
dotnet_diagnostic.CS8620.severity = error

# CS8625: Cannot convert null literal to non-nullable reference type.
dotnet_diagnostic.CS8625.severity = error

# CS8634: The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'class' constraint.
dotnet_diagnostic.CS8634.severity = error

# CS8643: Nullability of reference types in explicit interface specifier doesn't match interface implemented by the type.
dotnet_diagnostic.CS8643.severity = error

# CS8653: A default expression introduces a null value for a type parameter.
dotnet_diagnostic.CS8653.severity = error

# CS8714: The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'notnull' constraint.
dotnet_diagnostic.CS8714.severity = error

# IDE0059: Unnecessary assigment of a value
dotnet_diagnostic.IDE0059.severity = none

# IDE0060: Remove unused parameter
dotnet_diagnostic.IDE0060.severity = none
root = true

[*]
charset = utf-8
indent_size = 4
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true

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

[*.{slnx,csproj,proj,props,targets}]
indent_size = 2

[*.cs]
resharper_csharp_max_line_length = 160

# Using directive options
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = true

# Prefer var whenever possible
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion

# Indentation preferences
csharp_indent_labels = no_change

# IDE0079: Remove unnecessary suppression
dotnet_remove_unnecessary_suppression_exclusions = category:ReSharper
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
80 changes: 40 additions & 40 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
name: Publish
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+-[a-z]+.[0-9]+"
permissions:
contents: write
jobs:
publish:
if: github.repository == 'rameel/ramstack.expressionparser'
name: Publish packages
runs-on: ubuntu-latest
steps:
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Checkout
uses: actions/checkout@v4
- name: Build Solution
run: dotnet build -c Release
- name: Create NuGet Packages
run: dotnet pack -c Release -o ./nuget --no-build
- name: Publish NuGet Packages
run: dotnet nuget push ./nuget/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate -s https://api.nuget.org/v3/index.json
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
draft: true
files: nuget/*
name: Publish

on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+-[a-z]+.[0-9]+"

permissions:
contents: write

jobs:
publish:
if: github.repository == 'rameel/ramstack.expressionparser'
name: Publish packages
runs-on: ubuntu-latest

steps:
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x

- name: Checkout
uses: actions/checkout@v4

- name: Build Solution
run: dotnet build -c Release

- name: Create NuGet Packages
run: dotnet pack -c Release -o ./nuget --no-build

- name: Publish NuGet Packages
run: dotnet nuget push ./nuget/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate -s https://api.nuget.org/v3/index.json

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
draft: true
files: nuget/*
58 changes: 29 additions & 29 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
name: Build & Test
on:
pull_request:
branches: [main]
jobs:
build-and-test:
name: "Test projects"
runs-on: ubuntu-latest
steps:
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.x
7.x
8.x
9.x
10.x
- name: Checkout
uses: actions/checkout@v4
- name: Test Projects (Debug)
run: dotnet test -c Debug
- name: Test Projects (Release)
run: dotnet test -c Release
name: Build & Test

on:
pull_request:
branches: [main]

jobs:
build-and-test:
name: "Test projects"
runs-on: ubuntu-latest
steps:
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.x
7.x
8.x
9.x
10.x

- name: Checkout
uses: actions/checkout@v4

- name: Test Projects (Debug)
run: dotnet test -c Debug

- name: Test Projects (Release)
run: dotnet test -c Release
74 changes: 37 additions & 37 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
#Ignore thumbnails created by windows
[Tt]humbs.db
#Ignore files build by Visual Studio
*.obj
*.exe
*.pdb
*.user
*.patch
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
*.lib
*.sbr
*.cs.ide
[Dd]ebug*/
[Rr]elease*/
bin/
obj/
.vs/
.vscode/
*.ReSharper
*.ReSharper.user
[Tt]est[Rr]esult*
#Ignore Rider/Idea files
.idea/
#Ignore thumbnails created by windows
[Tt]humbs.db

#Ignore files build by Visual Studio
*.obj
*.exe
*.pdb
*.user
*.patch
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
*.lib
*.sbr
*.cs.ide
[Dd]ebug*/
[Rr]elease*/
bin/
obj/
.vs/
.vscode/
*.ReSharper
*.ReSharper.user
[Tt]est[Rr]esult*

#Ignore Rider/Idea files
.idea/
24 changes: 19 additions & 5 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
<Project>
<PropertyGroup>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
</PropertyGroup>
</Project>
<Project>
<PropertyGroup>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
</PropertyGroup>

<PropertyGroup>
<NoWarn>$(NoWarn);CS0649</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>latest</AnalysisLevel>
<AnalysisMode>Recommended</AnalysisMode>
<AnalysisModeStyle>Default</AnalysisModeStyle>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
</PropertyGroup>
</Project>
26 changes: 13 additions & 13 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="MinVer" Version="6.0.0" />
<PackageVersion Include="NUnit" Version="4.3.2" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageVersion Include="Ramstack.Parsing" Version="1.0.1" />
</ItemGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="MinVer" Version="6.0.0" />
<PackageVersion Include="NUnit" Version="4.3.2" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageVersion Include="Ramstack.Parsing" Version="1.0.1" />
</ItemGroup>
</Project>
18 changes: 9 additions & 9 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
MIT License
Copyright 2024 Rameel (https://github.com/rameel)
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.
MIT License

Copyright 2024 Rameel (https://github.com/rameel)

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.
Loading
Loading