Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonWei512 committed Sep 11, 2023
1 parent 870842f commit 7f61844
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 63 deletions.
118 changes: 59 additions & 59 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
name: ci

on:
push:
pull_request:
workflow_dispatch:
release:
types: [released]

jobs:
ci:
runs-on: windows-latest

permissions:
contents: write

env:
SOLUTION_NAME: NickJohn.WinUI.ObservableSettings.sln
PACKAGE_PROJECT_NAME: NickJohn.WinUI.ObservableSettings
TEST_PROJECT_NAME: NickJohn.WinUI.ObservableSettings.Test
CONFIGURATION: Release
PLATFORM: x64

steps:
- name: 📃 Create draft release
uses: ncipollo/release-action@v1
if: github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
with:
draft: true
generateReleaseNotes: true

- name: Checkout
uses: actions/checkout@v3

- name: Install .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x

- name: Add MSBuild to PATH
uses: microsoft/[email protected]

- name: Add VSTest to PATH
uses: darenm/[email protected]

- name: Restore dependencies
run: dotnet restore $env:SOLUTION_NAME

- name: Build solution
run: msbuild $env:SOLUTION_NAME /p:Configuration=${{ env.CONFIGURATION }} /p:Platform=${{ env.PLATFORM }}

- name: 🧪 Unit testing
run: vstest.console.exe test\${{ env.TEST_PROJECT_NAME }}\bin\${{ env.PLATFORM }}\${{ env.CONFIGURATION }}\*\${{ env.TEST_PROJECT_NAME }}.build.appxrecipe

- name: 🚀 Publish to Nuget
if: github.event_name == 'release' && github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
run: |
$packageFile = Get-ChildItem src\${{ env.PACKAGE_PROJECT_NAME }}\bin\${{ env.CONFIGURATION }}\${{ env.PACKAGE_PROJECT_NAME }}.*.nupkg
dotnet nuget push $packageFile --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json
name: ci

on:
push:
pull_request:
workflow_dispatch:
release:
types: [released]

jobs:
ci:
runs-on: windows-latest

permissions:
contents: write

env:
SOLUTION_NAME: NickJohn.WinUI.ObservableSettings.sln
PACKAGE_PROJECT_NAME: NickJohn.WinUI.ObservableSettings
TEST_PROJECT_NAME: NickJohn.WinUI.ObservableSettings.Test
CONFIGURATION: Release
PLATFORM: x64

steps:
- name: 📃 Create draft release
uses: ncipollo/release-action@v1
if: github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
with:
draft: true
generateReleaseNotes: true

- name: Checkout
uses: actions/checkout@v3

- name: Install .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x

- name: Add MSBuild to PATH
uses: microsoft/[email protected]

- name: Add VSTest to PATH
uses: darenm/[email protected]

- name: Restore dependencies
run: dotnet restore $env:SOLUTION_NAME

- name: ⚒️ Build solution
run: msbuild $env:SOLUTION_NAME /p:Configuration=${{ env.CONFIGURATION }} /p:Platform=${{ env.PLATFORM }}

- name: 🧪 Unit testing
run: vstest.console.exe test\${{ env.TEST_PROJECT_NAME }}\bin\${{ env.PLATFORM }}\${{ env.CONFIGURATION }}\*\${{ env.TEST_PROJECT_NAME }}.build.appxrecipe

- name: 🚀 Publish to Nuget
if: github.event_name == 'release' && github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
run: |
$packageFile = Get-ChildItem src\${{ env.PACKAGE_PROJECT_NAME }}\bin\${{ env.CONFIGURATION }}\${{ env.PACKAGE_PROJECT_NAME }}.*.nupkg
dotnet nuget push $packageFile --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ public static class RoslynExtensions
globalNamespaceStyle: SymbolDisplayGlobalNamespaceStyle.Included,
typeQualificationStyle: SymbolDisplayTypeQualificationStyle.NameAndContainingTypesAndNamespaces,
genericsOptions: SymbolDisplayGenericsOptions.IncludeTypeParameters,
miscellaneousOptions:
SymbolDisplayMiscellaneousOptions.EscapeKeywordIdentifiers);
miscellaneousOptions: SymbolDisplayMiscellaneousOptions.EscapeKeywordIdentifiers);

private static readonly SymbolDisplayFormat NoGlobalPrefixFormat = new(
globalNamespaceStyle: SymbolDisplayGlobalNamespaceStyle.Omitted,
typeQualificationStyle: SymbolDisplayTypeQualificationStyle.NameAndContainingTypesAndNamespaces,
genericsOptions: SymbolDisplayGenericsOptions.IncludeTypeParameters,
miscellaneousOptions:
SymbolDisplayMiscellaneousOptions.EscapeKeywordIdentifiers);
miscellaneousOptions: SymbolDisplayMiscellaneousOptions.EscapeKeywordIdentifiers);

public static string GetFullNameWithGlobalPrefix(this ISymbol symbol)
{
Expand Down

0 comments on commit 7f61844

Please sign in to comment.