diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index d9737dcf19..3ad6694334 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "gitreleasemanager.tool": { - "version": "0.19.0", + "version": "0.20.0", "commands": [ "dotnet-gitreleasemanager" ] diff --git a/.editorconfig b/.editorconfig index 317101a73a..f199d80f9e 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,8 +1,7 @@ +root = true # http://editorconfig.org # top-most EditorConfig file -root = true -charset = utf-8 [*] indent_style = space @@ -11,6 +10,12 @@ end_of_line = lf trim_trailing_whitespace = true insert_final_newline = true +# Microsoft .NET properties +dotnet_style_qualification_for_event = false:none +dotnet_style_qualification_for_field = false:none +dotnet_style_qualification_for_method = false:none +dotnet_style_qualification_for_property = false:none + [*.yml] indent_size = 2 @@ -59,19 +64,12 @@ dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion dotnet_style_prefer_inferred_tuple_names = true:suggestion dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning dotnet_style_prefer_simplified_interpolation = true:suggestion - -# Dispose rules (CA2000 and CA2213) ported to IDE analyzers. We already execute the CA rules on the repo, so disable the IDE ones. -dotnet_diagnostic.IDE0005.severity = none -dotnet_diagnostic.IDE0067.severity = none -dotnet_diagnostic.IDE0068.severity = none -dotnet_diagnostic.IDE0069.severity = none -dotnet_diagnostic.CA1016.severity = none #### C# Coding Conventions #### # Prefer "var" everywhere -csharp_style_var_for_built_in_types = true:silent -csharp_style_var_when_type_is_apparent = true:silent -csharp_style_var_elsewhere = true:silent +csharp_style_var_for_built_in_types = true:suggestion +csharp_style_var_when_type_is_apparent = true:suggestion +csharp_style_var_elsewhere = true:suggestion # Prefer method-like constructs to have a block body, except for lambdas csharp_style_expression_bodied_methods = true:warning @@ -153,46 +151,29 @@ csharp_space_between_method_call_parameter_list_parentheses = false csharp_space_between_method_declaration_empty_parameter_list_parentheses = false csharp_space_between_method_declaration_name_and_open_parenthesis = false csharp_space_between_method_declaration_parameter_list_parentheses = false -csharp_space_between_parentheses = false csharp_space_between_square_brackets = false +resharper_csharp_use_roslyn_logic_for_evident_types = true + # Alignment -align_multiline_parameter = true +resharper_csharp_align_multiline_parameter = true # Qualify fields with "this." -csharp_instance_members_qualify_members = field - -# IDE0011: Add braces -dotnet_diagnostic.IDE0011.severity = none - -# IDE0090: Use 'new(...)' -dotnet_diagnostic.IDE0090.severity = warning - -# IDE0041: Use 'is null' check -dotnet_diagnostic.IDE0041.severity = warning - -# CA1825: Avoid zero-length array allocations -dotnet_diagnostic.CA1825.severity = warning - -# CA1822: Mark members as static -dotnet_diagnostic.CA1822.severity = warning - -# CA2208: Instantiate argument exceptions correctly -dotnet_diagnostic.CA2208.severity = warning - -# CA1810: Initialize reference type static fields inline -dotnet_diagnostic.CA1810.severity = warning - -# CA1816: Dispose methods should call SuppressFinalize -dotnet_diagnostic.CA1816.severity = warning +resharper_csharp_instance_members_qualify_members = field # IDE0005: Using directive is unnecessary. -dotnet_diagnostic.IDE0005.severity = warning +dotnet_diagnostic.ide0005.severity = warning # RCS1037: Remove trailing white-space. -dotnet_diagnostic.RCS1037.severity = error +dotnet_diagnostic.rcs1037.severity = error # RCS1036: Remove redundant empty line. -dotnet_diagnostic.RCS1036.severity = error +dotnet_diagnostic.rcs1036.severity = error + +xml_space_before_self_closing = true + +resharper_arrange_object_creation_when_type_not_evident_highlighting = none + +resharper_unused_auto_property_accessor_global_highlighting = none -[resharper_]xml_space_before_self_closing = true \ No newline at end of file +resharper_unused_method_return_value_global_highlighting = none diff --git a/.gitattributes b/.gitattributes index 9a5cb22250..14ce78d666 100644 --- a/.gitattributes +++ b/.gitattributes @@ -11,6 +11,7 @@ # Custom for Visual Studio *.cs diff=csharp *.sln +*.slnx *.csproj *.vbproj *.fsproj diff --git a/.github/actions/docker-test/action.yml b/.github/actions/docker-test/action.yml index c7a747121f..5b8e20bba2 100644 --- a/.github/actions/docker-test/action.yml +++ b/.github/actions/docker-test/action.yml @@ -16,15 +16,25 @@ runs: steps: - name: '[Docker Build & Test] DockerHub' - shell: pwsh - run: | + uses: nick-fields/retry@v3 + with: + shell: pwsh + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | dotnet run/docker.dll --target=DockerTest ` --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} ` --docker_distro=${{ inputs.docker_distro }} --docker_registry dockerhub --verbosity=diagnostic - name: '[Docker Build & Test] GitHub' - shell: pwsh - run: | + uses: nick-fields/retry@v3 + with: + shell: pwsh + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | dotnet run/docker.dll --target=DockerTest ` --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} ` --docker_distro=${{ inputs.docker_distro }} --docker_registry github --verbosity=diagnostic diff --git a/.github/chatmodes/plan.chatmode.md b/.github/chatmodes/plan.chatmode.md new file mode 100644 index 0000000000..57ced4af97 --- /dev/null +++ b/.github/chatmodes/plan.chatmode.md @@ -0,0 +1,114 @@ +--- +description: 'Strategic planning and architecture assistant focused on thoughtful analysis before implementation. Helps developers understand codebases, clarify requirements, and develop comprehensive implementation strategies.' +tools: ['codebase', 'extensions', 'fetch', 'findTestFiles', 'githubRepo', 'problems', 'search', 'searchResults', 'usages', 'vscodeAPI'] +--- + +# Plan Mode - Strategic Planning & Architecture Assistant + +You are a strategic planning and architecture assistant focused on thoughtful analysis before implementation. Your primary role is to help developers understand their codebase, clarify requirements, and develop comprehensive implementation strategies. + +## Core Principles + +**Think First, Code Later**: Always prioritize understanding and planning over immediate implementation. Your goal is to help users make informed decisions about their development approach. + +**Information Gathering**: Start every interaction by understanding the context, requirements, and existing codebase structure before proposing any solutions. + +**Collaborative Strategy**: Engage in dialogue to clarify objectives, identify potential challenges, and develop the best possible approach together with the user. + +## Your Capabilities & Focus + +### Information Gathering Tools +- **Codebase Exploration**: Use the `codebase` tool to examine existing code structure, patterns, and architecture +- **Search & Discovery**: Use `search` and `searchResults` tools to find specific patterns, functions, or implementations across the project +- **Usage Analysis**: Use the `usages` tool to understand how components and functions are used throughout the codebase +- **Problem Detection**: Use the `problems` tool to identify existing issues and potential constraints +- **Test Analysis**: Use `findTestFiles` to understand testing patterns and coverage +- **External Research**: Use `fetch` to access external documentation and resources +- **Repository Context**: Use `githubRepo` to understand project history and collaboration patterns +- **VSCode Integration**: Use `vscodeAPI` and `extensions` tools for IDE-specific insights +- **External Services**: Use MCP tools like `mcp-atlassian` for project management context and `browser-automation` for web-based research + +### Planning Approach +- **Requirements Analysis**: Ensure you fully understand what the user wants to accomplish +- **Context Building**: Explore relevant files and understand the broader system architecture +- **Constraint Identification**: Identify technical limitations, dependencies, and potential challenges +- **Strategy Development**: Create comprehensive implementation plans with clear steps +- **Risk Assessment**: Consider edge cases, potential issues, and alternative approaches + +## Workflow Guidelines + +### 1. Start with Understanding +- Ask clarifying questions about requirements and goals +- Explore the codebase to understand existing patterns and architecture +- Identify relevant files, components, and systems that will be affected +- Understand the user's technical constraints and preferences + +### 2. Analyze Before Planning +- Review existing implementations to understand current patterns +- Identify dependencies and potential integration points +- Consider the impact on other parts of the system +- Assess the complexity and scope of the requested changes + +### 3. Develop Comprehensive Strategy +- Break down complex requirements into manageable components +- Propose a clear implementation approach with specific steps +- Identify potential challenges and mitigation strategies +- Consider multiple approaches and recommend the best option +- Plan for testing, error handling, and edge cases + +### 4. Present Clear Plans +- Provide detailed implementation strategies with reasoning +- Include specific file locations and code patterns to follow +- Suggest the order of implementation steps +- Identify areas where additional research or decisions may be needed +- Offer alternatives when appropriate + +## Best Practices + +### Information Gathering +- **Be Thorough**: Read relevant files to understand the full context before planning +- **Ask Questions**: Don't make assumptions - clarify requirements and constraints +- **Explore Systematically**: Use directory listings and searches to discover relevant code +- **Understand Dependencies**: Review how components interact and depend on each other + +### Planning Focus +- **Architecture First**: Consider how changes fit into the overall system design +- **Follow Patterns**: Identify and leverage existing code patterns and conventions +- **Consider Impact**: Think about how changes will affect other parts of the system +- **Plan for Maintenance**: Propose solutions that are maintainable and extensible + +### Communication +- **Be Consultative**: Act as a technical advisor rather than just an implementer +- **Explain Reasoning**: Always explain why you recommend a particular approach +- **Present Options**: When multiple approaches are viable, present them with trade-offs +- **Document Decisions**: Help users understand the implications of different choices + +## Interaction Patterns + +### When Starting a New Task +1. **Understand the Goal**: What exactly does the user want to accomplish? +2. **Explore Context**: What files, components, or systems are relevant? +3. **Identify Constraints**: What limitations or requirements must be considered? +4. **Clarify Scope**: How extensive should the changes be? + +### When Planning Implementation +1. **Review Existing Code**: How is similar functionality currently implemented? +2. **Identify Integration Points**: Where will new code connect to existing systems? +3. **Plan Step-by-Step**: What's the logical sequence for implementation? +4. **Consider Testing**: How can the implementation be validated? + +### When Facing Complexity +1. **Break Down Problems**: Divide complex requirements into smaller, manageable pieces +2. **Research Patterns**: Look for existing solutions or established patterns to follow +3. **Evaluate Trade-offs**: Consider different approaches and their implications +4. **Seek Clarification**: Ask follow-up questions when requirements are unclear + +## Response Style + +- **Conversational**: Engage in natural dialogue to understand and clarify requirements +- **Thorough**: Provide comprehensive analysis and detailed planning +- **Strategic**: Focus on architecture and long-term maintainability +- **Educational**: Explain your reasoning and help users understand the implications +- **Collaborative**: Work with users to develop the best possible solution + +Remember: Your role is to be a thoughtful technical advisor who helps users make informed decisions about their code. Focus on understanding, planning, and strategy development rather than immediate implementation. diff --git a/.github/chatmodes/planner.chatmode.md b/.github/chatmodes/planner.chatmode.md new file mode 100644 index 0000000000..baf3afb8ac --- /dev/null +++ b/.github/chatmodes/planner.chatmode.md @@ -0,0 +1,14 @@ +--- +description: 'Generate an implementation plan for new features or refactoring existing code.' +tools: ['codebase', 'fetch', 'findTestFiles', 'githubRepo', 'search', 'usages'] +--- +# Planning mode instructions +You are in planning mode. Your task is to generate an implementation plan for a new feature or for refactoring existing code. +Don't make any code edits, just generate a plan. + +The plan consists of a Markdown document that describes the implementation plan, including the following sections: + +* Overview: A brief description of the feature or refactoring task. +* Requirements: A list of requirements for the feature or refactoring task. +* Implementation Steps: A detailed list of steps to implement the feature or refactoring task. +* Testing: A list of tests that need to be implemented to verify the feature or refactoring task. diff --git a/.github/dependabot.yml b/.github/dependabot.yml index debc5ad413..87b6a493c0 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,65 +1,75 @@ version: 2 updates: -- package-ecosystem: dotnet-sdk - labels: + - package-ecosystem: dotnet-sdk + labels: - "dependencies" - commit-message: + commit-message: + prefix: "(sdk)" + directory: "/" + schedule: + interval: cron + cronjob: "0 12 * * *" + - package-ecosystem: nuget + labels: + - "dependencies" + commit-message: prefix: "(deps)" - directory: "/" - schedule: - interval: daily -- package-ecosystem: nuget - labels: - - "dependencies" - commit-message: - prefix: "(deps)" - groups: - microsoft: - patterns: - - "Microsoft.*" - - "System.*" - analyzers: - patterns: - - "*Analyzers" - serilog: + groups: + microsoft: + patterns: + - "Microsoft.*" + - "System.*" + Microsoft_CodeAnalysis: + patterns: + - "Microsoft.CodeAnalysis.*" + analyzers: + patterns: + - "*Analyzers" + serilog: + patterns: + - "Serilog.*" + nunit: + patterns: + - "NUnit.*" + LibGit2Sharp: patterns: - - "Serilog.*" - nunit: - patterns: - - "NUnit.*" - LibGit2Sharp: - patterns: - - "LibGit2Sharp.*" - directories: - - "/build" - - "/new-cli" - - "/src" - schedule: - interval: daily - open-pull-requests-limit: 10 + - "LibGit2Sharp.*" + JsonSchemaNet: + patterns: + - "JsonSchemaNet.*" + directories: + - "/build" + - "/new-cli" + - "/src" + schedule: + interval: cron + cronjob: "0 12 * * *" + open-pull-requests-limit: 10 + + - package-ecosystem: github-actions + labels: + - "dependencies" + commit-message: + prefix: "(build deps)" + groups: + actions: + patterns: + - "actions/*" + directory: "/" + schedule: + interval: cron + cronjob: "0 12 * * *" -- package-ecosystem: github-actions - labels: - - "dependencies" - commit-message: - prefix: "(build deps)" - groups: - actions: - patterns: - - "actions/*" - directory: "/" - schedule: - interval: daily - -- package-ecosystem: npm - labels: - - "dependencies" - commit-message: - prefix: "(docs deps)" - groups: - remark: - patterns: - - "remark*" - directory: "/" - schedule: - interval: monthly + - package-ecosystem: npm + labels: + - "dependencies" + commit-message: + prefix: "(docs deps)" + groups: + remark: + patterns: + - "remark*" + directory: "/" + schedule: + interval: cron + cronjob: "0 12 1,15 * *" diff --git a/.github/workflows/_artifacts_linux.yml b/.github/workflows/_artifacts_linux.yml index 4bd3272370..f7091bdfc5 100644 --- a/.github/workflows/_artifacts_linux.yml +++ b/.github/workflows/_artifacts_linux.yml @@ -17,7 +17,7 @@ on: env: DOTNET_INSTALL_DIR: "./.dotnet" DOTNET_ROLL_FORWARD: "Major" - + jobs: artifacts: name: ${{ matrix.docker_distro }} - net${{ matrix.dotnet_version }} @@ -30,20 +30,20 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - name: Restore State uses: ./.github/actions/cache-restore - - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v6 name: Download nuget packages with: name: nuget path: ${{ github.workspace }}/artifacts/packages/nuget - - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v6 name: Download native packages with: name: native-Linux @@ -53,8 +53,14 @@ jobs: uses: ./.github/actions/docker-setup - name: '[Test Artifacts]' - shell: pwsh - run: | + uses: nick-fields/retry@v3 + with: + shell: pwsh + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | dotnet run/artifacts.dll ` - --target=ArtifactsTest --arch=${{ inputs.arch }} --dotnet_version=${{ matrix.dotnet_version }} ` - --docker_distro=${{ matrix.docker_distro }} \ No newline at end of file + --target=ArtifactsTest --arch=${{ inputs.arch }} ` + --dotnet_version=${{ matrix.dotnet_version }} ` + --docker_distro=${{ matrix.docker_distro }} diff --git a/.github/workflows/_artifacts_windows.yml b/.github/workflows/_artifacts_windows.yml index c93e7092bd..fb7c2e0696 100644 --- a/.github/workflows/_artifacts_windows.yml +++ b/.github/workflows/_artifacts_windows.yml @@ -17,14 +17,14 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - name: Restore State uses: ./.github/actions/cache-restore - - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v6 name: Download nuget packages with: name: nuget diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml index b3ce787c63..c34e570287 100644 --- a/.github/workflows/_build.yml +++ b/.github/workflows/_build.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - @@ -29,21 +29,21 @@ jobs: run: dotnet run/build.dll --target=Package - name: 'Upload nuget packages' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: matrix.os == 'windows-2025' with: name: nuget path: ${{ github.workspace }}/artifacts/packages/nuget - name: 'Upload native packages' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: matrix.os == 'windows-2025' with: name: native-${{ runner.os }} path: ${{ github.workspace }}/artifacts/packages/native/*.zip - name: 'Upload native packages' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: matrix.os != 'windows-2025' with: name: native-${{ runner.os }} diff --git a/.github/workflows/_docker.yml b/.github/workflows/_docker.yml index 8d3d3129cc..cd415edfa5 100644 --- a/.github/workflows/_docker.yml +++ b/.github/workflows/_docker.yml @@ -30,14 +30,14 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - name: Restore State uses: ./.github/actions/cache-restore - - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v6 name: Download nuget packages with: name: nuget diff --git a/.github/workflows/_docker_manifests.yml b/.github/workflows/_docker_manifests.yml index 07df99a950..0fb895ec27 100644 --- a/.github/workflows/_docker_manifests.yml +++ b/.github/workflows/_docker_manifests.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - diff --git a/.github/workflows/_prepare.yml b/.github/workflows/_prepare.yml index f227724340..4a0abe2050 100644 --- a/.github/workflows/_prepare.yml +++ b/.github/workflows/_prepare.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Cache cake frosting id: cache-cake @@ -40,13 +40,13 @@ jobs: key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }} - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: global-json-file: global.json - name: '[Build]' if: steps.cache-cake.outputs.cache-hit != 'true' - run: dotnet build build/CI.sln --configuration=Release + run: dotnet build build/ --configuration=Release - name: '[Prepare]' shell: pwsh @@ -61,7 +61,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Restore State uses: ./.github/actions/cache-restore diff --git a/.github/workflows/_publish.yml b/.github/workflows/_publish.yml index 142042a8da..6f73aa4bc7 100644 --- a/.github/workflows/_publish.yml +++ b/.github/workflows/_publish.yml @@ -4,7 +4,7 @@ on: env: DOTNET_INSTALL_DIR: "./.dotnet" DOTNET_ROLL_FORWARD: "Major" - + jobs: publish: name: ${{ matrix.taskName }} @@ -21,19 +21,20 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - name: Restore State uses: ./.github/actions/cache-restore - - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v6 name: Download nuget packages with: name: nuget path: ${{ github.workspace }}/artifacts/packages/nuget + - name: '[Publish]' shell: pwsh - run: dotnet run/publish.dll --target=Publish${{ matrix.taskName }} \ No newline at end of file + run: dotnet run/publish.dll --target=Publish${{ matrix.taskName }} diff --git a/.github/workflows/_unit_tests.yml b/.github/workflows/_unit_tests.yml index 7557db2398..502f1d507e 100644 --- a/.github/workflows/_unit_tests.yml +++ b/.github/workflows/_unit_tests.yml @@ -7,7 +7,7 @@ on: env: DOTNET_INSTALL_DIR: "./.dotnet" DOTNET_ROLL_FORWARD: "Major" - + jobs: unit_test: name: ${{ matrix.os }} - net${{ matrix.dotnet_version }} @@ -16,27 +16,32 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-2025, ubuntu-24.04, macos-15] + os: [ windows-2025, ubuntu-24.04, macos-15 ] dotnet_version: ${{ fromJson(inputs.dotnet_versions) }} runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - name: Restore State uses: ./.github/actions/cache-restore - - - name: '[Unit Test]' - shell: pwsh - run: dotnet run/build.dll --target=Test --dotnet_version=${{ matrix.dotnet_version }} + + - name: '[Unit Test]' + uses: nick-fields/retry@v3 + with: + shell: pwsh + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: 'dotnet run/build.dll --target=Test --dotnet_version=${{ matrix.dotnet_version }}' - name: Test Summary uses: test-summary/action@v2.4 - if: matrix.dotnet_version == '9.0' + if: ${{ always() && matrix.dotnet_version == '9.0' }} with: paths: artifacts/test-results/*.results.xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e26468265..2421ae3dd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -124,7 +124,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - @@ -152,7 +152,7 @@ jobs: - name: '[Publish Release]' if: ${{ github.event_name == 'repository_dispatch' }} - uses: peter-evans/repository-dispatch@v3 + uses: peter-evans/repository-dispatch@v4 with: token: ${{ secrets.RELEASE_GITHUB_TOKEN }} repository: ${{ github.repository }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 752b375de9..c53b7a4cd7 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -49,12 +49,12 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} @@ -68,13 +68,13 @@ jobs: - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: global-json-file: global.json - name: '[Prepare]' if: steps.cache-cake.outputs.cache-hit != 'true' - run: dotnet build build/CI.sln --configuration=Release + run: dotnet build build/ --configuration=Release - name: '[Build]' @@ -82,4 +82,4 @@ jobs: run: dotnet run/build.dll --target=BuildPrepare --exclusive - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@v4 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f49b4d9436..f3874e8c13 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -38,7 +38,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - @@ -72,13 +72,13 @@ jobs: restore-keys: node-${{ runner.os }} - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: global-json-file: global.json - name: '[Build]' if: steps.cache-cake.outputs.cache-hit != 'true' - run: dotnet build build/CI.sln --configuration=Release + run: dotnet build build/ --configuration=Release - name: '[Prepare]' shell: pwsh @@ -91,7 +91,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - @@ -130,7 +130,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index f3cc9ffc04..ffe858459c 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -39,21 +39,15 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: global-json-file: global.json - name: Run Format 'ci' solution run: dotnet format ./build/ --verify-no-changes - - - name: Build 'new-cli' solution - run: dotnet build ./new-cli - - - name: Run Format 'new-cli' solution - run: dotnet format ./new-cli/ --exclude ~/.nuget/packages --verify-no-changes - name: Run Format 'GitVersion' solution run: dotnet format ./src/ --exclude **/AddFormats/ --verify-no-changes diff --git a/.github/workflows/gittools-actions.yml b/.github/workflows/gittools-actions.yml new file mode 100644 index 0000000000..8d5bcd04eb --- /dev/null +++ b/.github/workflows/gittools-actions.yml @@ -0,0 +1,43 @@ +name: Update GitTools Actions + +on: + workflow_dispatch: + inputs: + tag-name: + description: 'Tag name to use for the release' + required: true + repository_dispatch: + types: [ publish-release ] + +defaults: + run: + shell: pwsh + +permissions: + contents: read + +jobs: + homebrew: + permissions: + contents: none + name: Update GitTools Actions + runs-on: ubuntu-24.04 + steps: + - + name: Get version + id: get-version + shell: pwsh + run: | + $version = "${{ github.event.client_payload.tag }}" + if ($version -eq "") { + $version = "${{ github.event.inputs.tag-name }}" + } + "version=$version" >> $env:GITHUB_OUTPUT + - + uses: peter-evans/repository-dispatch@v4 + name: Update GitTools Actions + with: + token: ${{ secrets.RELEASE_GITHUB_TOKEN }} + repository: ${{ github.repository_owner }}/actions + event-type: gitversion-release-published + client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag": "${{ steps.get-version.outputs.version }}"}' diff --git a/.github/workflows/homebrew.yml b/.github/workflows/homebrew.yml index 12cfa22056..3f3ee536b2 100644 --- a/.github/workflows/homebrew.yml +++ b/.github/workflows/homebrew.yml @@ -19,7 +19,8 @@ jobs: name: Bump Homebrew formula runs-on: macos-latest steps: - - name: Get version + - + name: Get version id: get-version shell: pwsh run: | @@ -27,7 +28,7 @@ jobs: if ($version -eq "") { $version = "${{ github.event.inputs.tag-name }}" } - "version=$version" >> $env:GITHUB_OUTPUT + "version=$version" >> $env:GITHUB_OUTPUT - uses: mislav/bump-homebrew-formula-action@v3 name: Bump Homebrew formula @@ -40,4 +41,4 @@ jobs: For additional details see https://github.com/GitTools/GitVersion/releases/tag/${{ steps.get-version.outputs.version }} env: - COMMITTER_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} \ No newline at end of file + COMMITTER_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml index e3918452ad..126128ed88 100644 --- a/.github/workflows/mkdocs.yml +++ b/.github/workflows/mkdocs.yml @@ -1,17 +1,32 @@ name: Markdown Update on: push: + branches: + - main + - 'fix/*' + - 'feature/*' + - 'poc/*' + - 'support/*' + paths: + - 'docs/**' + + pull_request: + branches: + - main + - 'support/*' + paths: + - 'docs/**' env: DOTNET_ROLL_FORWARD: "Major" DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 DOTNET_NOLOGO: 1 - + defaults: run: shell: pwsh - + jobs: docs: name: Update Markdown (embedded snippets) @@ -19,29 +34,36 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 + if: github.event_name == 'push' + with: + token: ${{ secrets.PUSH_GITHUB_TOKEN }} + - + name: Checkout + uses: actions/checkout@v5 + if: github.event_name == 'pull_request' - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: global-json-file: global.json - - + - name: Run MarkdownSnippets run: | dotnet tool install --global MarkdownSnippets.Tool mdsnippets --write-header false working-directory: ${{ github.workspace }}/docs/input - - + - name: Check for changes id: status run: | if ($null -ne (git status --porcelain)) { echo "has_changes=1"; echo "has_changes=1" >> $env:GITHUB_OUTPUT } - - + - name: Push changes run: | git add --verbose . - git config user.name 'Artur Stolear' - git config user.email 'artur.stolear@gmail.com' + git config user.name 'gittools-bot' + git config user.email 'gittoolsbot@outlook.com' git commit -m 'Docs changes' --allow-empty git push --force - if: steps.status.outputs.has_changes == '1' \ No newline at end of file + if: steps.status.outputs.has_changes == '1' diff --git a/.github/workflows/new-cli.yml b/.github/workflows/new-cli.yml new file mode 100644 index 0000000000..6793b7eee4 --- /dev/null +++ b/.github/workflows/new-cli.yml @@ -0,0 +1,56 @@ +name: Build (new-cli) +on: + push: + branches: + - main + - 'fix/*' + - 'feature/*' + - 'poc/*' + - 'support/*' + paths: + - '**' + - '!docs/**' + - '!.github/**' + - .github/workflows/new-cli.yml + + pull_request: + branches: + - main + - 'support/*' + paths: + - '**' + - '!docs/**' + - '!.github/**' + - .github/workflows/new-cli.yml + +permissions: + contents: read + +env: + DOTNET_ROLL_FORWARD: "Major" + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + DOTNET_NOLOGO: 1 + +jobs: + format: + runs-on: ubuntu-24.04 + name: Build & Test (new-cli) + steps: + - + name: Checkout + uses: actions/checkout@v5 + - + name: Setup .NET SDK + uses: actions/setup-dotnet@v5 + with: + global-json-file: global.json + - + name: Build 'new-cli' solution + run: dotnet build ./new-cli + - + name: Run Format 'new-cli' solution + run: dotnet format ./new-cli --exclude ~/.nuget/packages --verify-no-changes + - + name: Test 'new-cli' solution + run: dotnet test ./new-cli --no-build --verbosity normal diff --git a/.github/workflows/public-api.yml b/.github/workflows/public-api.yml new file mode 100644 index 0000000000..97898f72ff --- /dev/null +++ b/.github/workflows/public-api.yml @@ -0,0 +1,44 @@ +name: Mark public API as shipped + +on: + workflow_dispatch: + repository_dispatch: + types: [ publish-release ] + +defaults: + run: + shell: pwsh + +permissions: + contents: read + +jobs: + homebrew: + permissions: + contents: none + name: Mark public API as shipped + runs-on: ubuntu-24.04 + steps: + - + name: Checkout + uses: actions/checkout@v5 + if: github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' + with: + token: ${{ secrets.PUSH_GITHUB_TOKEN }} + - + name: Mark public API as shipped + run: ./src/mark-shipped.ps1 + - + name: Check for changes + id: status + run: | + if ($null -ne (git status --porcelain)) { echo "has_changes=1"; echo "has_changes=1" >> $env:GITHUB_OUTPUT } + - + name: Push changes + run: | + git add --verbose . + git config user.name 'gittools-bot' + git config user.email 'gittoolsbot@outlook.com' + git commit -m 'Mark public API as shipped' --allow-empty + git push --force + if: steps.status.outputs.has_changes == '1' diff --git a/.github/workflows/qodana_analysis.yml b/.github/workflows/qodana_analysis.yml new file mode 100644 index 0000000000..3d7c0e1eca --- /dev/null +++ b/.github/workflows/qodana_analysis.yml @@ -0,0 +1,35 @@ +name: Qodana +on: + workflow_dispatch: + push: + branches: + - main + - 'fix/*' + - 'feature/*' +jobs: + qodana: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + checks: write + steps: + - + uses: actions/checkout@v5 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + - + name: Setup .NET SDK + uses: actions/setup-dotnet@v5 + with: + global-json-file: global.json + - + name: 'Qodana Scan' + uses: jetbrains/qodana-action@v2025.2.1 + with: + args: --baseline,qodana.sarif.json + cache-default-branch-only: true + pr-mode: true + env: + QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae9230ea55..c663002892 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Get version id: get-version @@ -20,7 +20,7 @@ jobs: $VERSION="${{ github.ref }}".Replace("refs/tags/", "") "version=$VERSION" >> $env:GITHUB_OUTPUT - - uses: peter-evans/repository-dispatch@v3 + uses: peter-evans/repository-dispatch@v4 with: token: ${{ secrets.RELEASE_GITHUB_TOKEN }} repository: ${{ github.repository }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 4db0930525..268a3c6c3f 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -13,7 +13,7 @@ jobs: stale: runs-on: ubuntu-24.04 steps: - - uses: actions/stale@v9 + - uses: actions/stale@v10 with: operations-per-run: 100 # set 'stale' label diff --git a/.gitignore b/.gitignore index 6625c880d9..dfc424aaaa 100644 --- a/.gitignore +++ b/.gitignore @@ -61,7 +61,6 @@ TestResults ClientBin stylecop.* ~$* -*~ *.dbmdl site/ Generated_Code #added for RIA/Silverlight projects @@ -84,10 +83,8 @@ Thumbs.db Desktop.ini _NCrunch_GitVersion -GitVersion.sln.ide/ .vs/ Packages/ -site/ /TestResult.xml ################ @@ -95,8 +92,6 @@ site/ ################ .idea -*.sln.iml - #################### # Visual Studio Code diff --git a/GitVersion.yml b/.gitversion.yml similarity index 100% rename from GitVersion.yml rename to .gitversion.yml diff --git a/build/.run/Artifacts DotnetTool Test.run.xml b/build/.run/Artifacts DotnetTool Test.run.xml index f09edd6a7e..ffb49db890 100644 --- a/build/.run/Artifacts DotnetTool Test.run.xml +++ b/build/.run/Artifacts DotnetTool Test.run.xml @@ -1,7 +1,7 @@ - \ No newline at end of file + diff --git a/build/.run/Artifacts MsBuildCore Test.run.xml b/build/.run/Artifacts MsBuildCore Test.run.xml index 034885bdb1..8478f08108 100644 --- a/build/.run/Artifacts MsBuildCore Test.run.xml +++ b/build/.run/Artifacts MsBuildCore Test.run.xml @@ -1,7 +1,7 @@ - \ No newline at end of file + diff --git a/build/.run/Artifacts Native Test.run.xml b/build/.run/Artifacts Native Test.run.xml index 185bfa09bc..b7ea118f83 100644 --- a/build/.run/Artifacts Native Test.run.xml +++ b/build/.run/Artifacts Native Test.run.xml @@ -1,7 +1,7 @@ - \ No newline at end of file + diff --git a/build/.run/Artifacts Prepare.run.xml b/build/.run/Artifacts Prepare.run.xml index c662b76166..43c9e42042 100644 --- a/build/.run/Artifacts Prepare.run.xml +++ b/build/.run/Artifacts Prepare.run.xml @@ -1,7 +1,7 @@ - \ No newline at end of file + diff --git a/build/.run/Artifacts Test.run.xml b/build/.run/Artifacts Test.run.xml index 9f07df0d26..b9807ea4a4 100644 --- a/build/.run/Artifacts Test.run.xml +++ b/build/.run/Artifacts Test.run.xml @@ -1,7 +1,7 @@ - \ No newline at end of file + diff --git a/build/.run/Docker Build.run.xml b/build/.run/Docker Build.run.xml index ee230e7d4d..b2da1eadd5 100644 --- a/build/.run/Docker Build.run.xml +++ b/build/.run/Docker Build.run.xml @@ -1,7 +1,7 @@ - \ No newline at end of file + diff --git a/build/.run/Docker Manifest.run.xml b/build/.run/Docker Manifest.run.xml index 6b6293a626..deb625e045 100644 --- a/build/.run/Docker Manifest.run.xml +++ b/build/.run/Docker Manifest.run.xml @@ -1,7 +1,7 @@ - \ No newline at end of file + diff --git a/build/.run/Docker Publish.run.xml b/build/.run/Docker Publish.run.xml index ea23af56ab..25a5f9d7a7 100644 --- a/build/.run/Docker Publish.run.xml +++ b/build/.run/Docker Publish.run.xml @@ -1,7 +1,7 @@ - \ No newline at end of file + diff --git a/build/.run/Docker Test.run.xml b/build/.run/Docker Test.run.xml index 09ac793b19..f7664d6759 100644 --- a/build/.run/Docker Test.run.xml +++ b/build/.run/Docker Test.run.xml @@ -1,7 +1,7 @@ - \ No newline at end of file + diff --git a/build/.run/Generate Schemas.run.xml b/build/.run/Generate Schemas.run.xml index e4dcf435a9..e009ddc54a 100644 --- a/build/.run/Generate Schemas.run.xml +++ b/build/.run/Generate Schemas.run.xml @@ -18,6 +18,7 @@