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
20 changes: 20 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": 1,
"isRoot": true,
"tools": {
"csharpier": {
"version": "1.0.2",
"commands": [
"csharpier"
],
"rollForward": false
},
"husky": {
"version": "0.7.2",
"commands": [
"husky"
],
"rollForward": false
}
}
}
6 changes: 2 additions & 4 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@ jobs:

- name: Format checks
run: |
dotnet new tool-manifest
dotnet tool install csharpier
dotnet tool install dotnet-format
dotnet csharpier check --log-level=information .
dotnet tool restore
dotnet csharpier check --log-level=debug .
dotnet format --verify-no-changes --severity=info --verbosity=detailed

publish:
Expand Down
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

dotnet husky run
22 changes: 22 additions & 0 deletions .husky/task-runner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "https://alirezanet.github.io/Husky.Net/schema.json",
"tasks": [
{
"name": "CSharpier Format",
"command": "csharpier",
"args": ["format", "--log-level=debug", "${staged}"],
"include": ["**/*.cs"]
},
{
"name": ".Net Format",
"command": "dotnet",
"args": [
"format",
"--verify-no-changes",
"--severity=info",
"--verbosity=detailed"
],
"include": ["**/*.cs"]
}
]
}
38 changes: 36 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": "2.0.0",
"tasks": [
{
"label": ".NET Build",
"label": ".Net Build",
"type": "dotnet",
"task": "build",
"group": "build",
Expand All @@ -13,7 +13,7 @@
}
},
{
"label": ".NET Format",
"label": ".Net Format",
"type": "process",
"command": "dotnet",
"args": [
Expand All @@ -36,6 +36,7 @@
"command": "csharpier",
"args": [
"format",
"--log-level=debug",
"."
],
"problemMatcher": [
Expand All @@ -46,5 +47,38 @@
"clear": false
}
},
{
"label": ".Net Tool Update",
"type": "process",
"command": "dotnet",
"args": [
"tool",
"update",
"--all"
],
"problemMatcher": [
"$msCompile"
],
"presentation": {
"showReuseMessage": false,
"clear": false
}
},
{
"label": "Husky.Net Run",
"type": "process",
"command": "dotnet",
"args": [
"husky",
"run"
],
"problemMatcher": [
"$msCompile"
],
"presentation": {
"showReuseMessage": false,
"clear": false
}
},
]
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,13 @@ languageLookup.IsMatch("zh-Hant", "zh-Hans"); // false

- [AwesomeAssertions](https://awesomeassertions.org/)
- [Bring Your Own Badge](https://github.com/marketplace/actions/bring-your-own-badge)
- [CSharpier](https://csharpier.com/)
- [Create Pull Request](https://github.com/marketplace/actions/create-pull-request)
- [GH Release](https://github.com/marketplace/actions/gh-release)
- [Git Auto Commit](https://github.com/marketplace/actions/git-auto-commit)
- [GitHub Actions](https://github.com/actions)
- [GitHub Dependabot](https://github.com/dependabot)
- [Husky.Net](https://alirezanet.github.io/Husky.Net/)
- [Nerdbank.GitVersioning](https://github.com/marketplace/actions/nerdbank-gitversioning)
- [Serilog](https://serilog.net/)
- [xUnit.Net](https://xunit.net/)
Expand Down