Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update VTEX.API.csproj #374

Merged
merged 18 commits into from
Nov 13, 2024
Merged

Update VTEX.API.csproj #374

merged 18 commits into from
Nov 13, 2024

Conversation

guibranco
Copy link
Owner

@guibranco guibranco commented Nov 12, 2024

Closes #

πŸ“‘ Description

βœ… Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

☒️ Does this introduce a breaking change?

  • Yes
  • No

β„Ή Additional Information

Summary by CodeRabbit

  • New Features

    • Introduced a unique project identifier for better project management.
    • Added a description for the VTEX SDK, enhancing user understanding.
    • Included package tags for improved categorization and searchability.
    • Provided release notes for users to stay informed about updates.
    • Implemented a new GitHub Actions workflow for automated security scanning.
    • Added a new configuration for managing contributors in the README.
    • Introduced a new JSON configuration for SonarLint integration.
  • Updates

    • Simplified target framework management for enhanced compatibility.
    • Updated the Deep Source coverage report path for better accuracy.
    • Enhanced the Infisical secrets check with a newer action version.
    • Changed the documentation publishing workflow name for clarity.
  • Bug Fixes

    • Transitioned testing framework from Moq to NSubstitute for improved testing reliability.
    • Updated paths for coverage reports in the build process for consistency.

Copy link

coderabbitai bot commented Nov 12, 2024

Walkthrough

The changes in the VTEX.API.csproj file involve updates to the project configuration. The <TargetFrameworks> entry has been simplified to reference a variable $(DotNetVersions), and several new properties have been added, including <ProjectGuid>, <Description>, <PackageTags>, and <PackageReleaseNotes>. The <LangVersion> property has been removed. These modifications enhance the project structure and metadata.

Changes

File Path Change Summary
Src/VTEX.API/VTEX.API.csproj - Added <ProjectGuid>{931C39A1-583E-5587-AB8D-508C7B1FC15E}</ProjectGuid>
- Updated <TargetFrameworks> from netstandard2.0;netstandard2.1;net6.0;net8.0 to $(DotNetVersions)
- Added <Description>The VTEX platform (PaaS) (e-commerce) SDK. A .NET client to consume VTEX APIs for both Core and Framework projects</Description>
- Added <PackageTags>vtex paas client sdk ecommerce e-commerce platform apis</PackageTags>
- Added <PackageReleaseNotes>Chore</PackageReleaseNotes>
- Removed <LangVersion>
.gitattributes - Set * text=auto for line endings normalization.
- Added comments for diff settings and merge strategies.
.github/dependabot.yml - Added group CrispyWaffle with pattern CrispyWaffle* for organized dependency updates.
.github/workflows/codacy.yml - Introduced a new workflow for Codacy security scans with specific job steps and triggers.
.github/workflows/contributors-readme.yml - Added permissions for contents and pull-requests in the contributors update workflow.
.github/workflows/deep-source.yml - Updated coverage report output file path in the Deep Source workflow.
.github/workflows/infisical-secrets-check.yml - Updated action version for the secrets check from v1.1.15 to v1.1.16.
.github/workflows/publish-docs.yml - Renamed workflow from "Deploy Documentation" to "Publish Documentation."
.sonarlint/VTEX-SDK-dotnet.json - Created new configuration file for SonarLint with organization and project key.
.vscode/settings.json - Removed "peacock.color" setting and added SonarLint connection settings.
SECURITY.md - Removed the file containing security reporting guidelines.
Tests/VTEX.Tests/Health/VtexHealthClientTests.cs - Changed mocking framework from Moq to NSubstitute in health client tests.
Tests/VTEX.Tests/VTEX.Tests.csproj - Added package reference for NSubstitute version 5.3.0.

Possibly related PRs

Suggested labels

enhancement, size/M, Review effort [1-5]: 2

Suggested reviewers

  • gstraccini

Poem

In the code where changes bloom,
A GUID to chase away the gloom.
Frameworks now simplified,
With tags and notes, our pride.
VTEX API, a joyful tune,
E-commerce magic, coming soon! πŸ‡βœ¨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❀️ Share
πŸͺ§ Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 12, 2024
@guibranco guibranco enabled auto-merge (squash) November 12, 2024 19:32
@gstraccini gstraccini bot added the β˜‘οΈ auto-merge Automatic merging of pull requests (gstraccini-bot) label Nov 12, 2024
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
Src/VTEX.API/VTEX.API.csproj (1)

6-8: Enhance package metadata for better discoverability

While the additions are good, there are some improvements that could be made:

Consider these enhancements:

-    <Description>The VTEX platform (PaaS) (e-commerce) SDK. A .NET client to consume VTEX APIs for both Core and Framework projects</Description>
+    <Description>.NET SDK for VTEX e-commerce platform APIs, supporting both Core and Framework projects</Description>
-    <PackageTags>vtex paas client sdk ecommerce e-commerce platform apis</PackageTags>
+    <PackageTags>vtex;paas;sdk;ecommerce;api-client;dotnet</PackageTags>
-    <PackageReleaseNotes>Chore</PackageReleaseNotes>
+    <PackageReleaseNotes>Updated project structure and target framework configuration</PackageReleaseNotes>

Changes explained:

  1. More concise description while maintaining clarity
  2. Semicolon-separated tags (NuGet convention)
  3. More descriptive release notes
πŸ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between e245c11 and 3630698.

πŸ“’ Files selected for processing (1)
  • Src/VTEX.API/VTEX.API.csproj (1 hunks)
πŸ”‡ Additional comments (3)
Src/VTEX.API/VTEX.API.csproj (3)

4-4: LGTM: Valid ProjectGuid addition

The ProjectGuid follows the correct format and is a good practice for project identification in Visual Studio.


Line range hint 1-15: Verify impact of LangVersion removal

The removal of the LangVersion property might affect which C# language features are available to the project.

#!/bin/bash
# Description: Check for language version settings in other configuration files
# and verify the impact of its removal

echo "Checking for language version settings in other files..."
rg -l "LangVersion" --type-add 'props:*.props' --type-add 'csproj:*.csproj' -t props -t csproj

echo "Checking C# language features usage..."
rg -l "record\s+class|record\s+struct|init;|required\s+\w+|switch\s+expression" --type csharp

5-5: Verify $(DotNetVersions) variable definition

The change to use $(DotNetVersions) variable is good for maintainability, but we need to ensure it's properly defined.

@github-actions github-actions bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 12, 2024
@github-actions github-actions bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 12, 2024
@github-actions github-actions bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 12, 2024
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

1 similar comment
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

7 similar comments
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (6)
.github/workflows/contributors-readme.yml (2)

15-17: Fix indentation in permissions block

The explicit permissions declaration is a good security practice, following the principle of least privilege. However, the indentation needs to be adjusted to match the workflow structure.

Apply this diff to fix the indentation:

    contrib-readme-job:
        runs-on: ubuntu-latest
        name: Update files
-        permissions:
-          contents: write
-          pull-requests: write
+        permissions:
+            contents: write
+            pull-requests: write
🧰 Tools
πŸͺ› yamllint

[warning] 16-16: wrong indentation: expected 12 but found 10

(indentation)


19-19: Remove trailing spaces

There are trailing spaces on this blank line that should be removed.

Apply this diff to fix the trailing spaces:

-        
+
🧰 Tools
πŸͺ› yamllint

[error] 19-19: trailing spaces

(trailing-spaces)

.github/workflows/codacy.yml (3)

16-23: Consider optimizing workflow triggers and schedule

The current configuration might lead to redundant scans:

  1. Running on both push and pull_request to main could result in duplicate scans for PRs that are merged.
  2. The schedule time (17:42 UTC on Fridays) seems arbitrary. Consider scheduling during off-peak hours to optimize CI resources.
 on:
   push:
     branches: [ "main" ]
-  pull_request:
-    # The branches below must be a subset of the branches above
-    branches: [ "main" ]
   schedule:
-    - cron: '42 17 * * 5'
+    - cron: '0 2 * * 1' # Run at 2 AM UTC on Mondays

25-27: Remove redundant top-level permission

The contents: read permission is already defined at the job level with proper documentation. The top-level permission declaration is redundant.

-permissions:
-  contents: read
-

49-50: Consider parameterizing the SARIF file path

The SARIF file path is hardcoded in multiple places. Consider using a workflow variable for better maintainability.

+env:
+  SARIF_FILE: results.sarif
+
 jobs:
   codacy-security-scan:
     steps:
       - name: Run Codacy Analysis CLI
         with:
-          output: results.sarif
+          output: ${{ env.SARIF_FILE }}
           format: sarif
       - name: Upload SARIF results file
         with:
-          sarif_file: results.sarif
+          sarif_file: ${{ env.SARIF_FILE }}

Also applies to: 60-61

Tests/VTEX.Tests/Health/VtexHealthClientTests.cs (1)

61-67: Consider adding test cases for error scenarios.

While the current test covers both healthy and unhealthy statuses, it might be worth adding test cases for:

  • API exceptions
  • Timeout scenarios
  • Empty or null responses

Would you like me to provide examples of these additional test cases?

πŸ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 3630698 and 9456db7.

πŸ“’ Files selected for processing (12)
  • .gitattributes (1 hunks)
  • .github/dependabot.yml (2 hunks)
  • .github/workflows/codacy.yml (1 hunks)
  • .github/workflows/contributors-readme.yml (1 hunks)
  • .github/workflows/deep-source.yml (1 hunks)
  • .github/workflows/infisical-secrets-check.yml (1 hunks)
  • .github/workflows/publish-docs.yml (1 hunks)
  • .sonarlint/VTEX-SDK-dotnet.json (1 hunks)
  • .vscode/settings.json (1 hunks)
  • SECURITY.md (0 hunks)
  • Tests/VTEX.Tests/Health/VtexHealthClientTests.cs (3 hunks)
  • Tests/VTEX.Tests/VTEX.Tests.csproj (1 hunks)
πŸ’€ Files with no reviewable changes (1)
  • SECURITY.md
βœ… Files skipped from review due to trivial changes (4)
  • .gitattributes
  • .github/workflows/infisical-secrets-check.yml
  • .github/workflows/publish-docs.yml
  • .sonarlint/VTEX-SDK-dotnet.json
🧰 Additional context used
πŸͺ› yamllint
.github/workflows/contributors-readme.yml

[warning] 16-16: wrong indentation: expected 12 but found 10

(indentation)


[error] 19-19: trailing spaces

(trailing-spaces)

πŸͺ› Biome
.vscode/settings.json

[error] 22-22: expected , but instead found "sonarlint.connectedMode.project"

Remove "sonarlint.connectedMode.project"

(parse)

πŸ”‡ Additional comments (10)
.github/dependabot.yml (2)

35-35: LGTM!

Simple formatting improvement for consistency.


19-22: LGTM! Verify CrispyWaffle package dependencies.

The addition of a CrispyWaffle group is a good practice to consolidate related package updates.

Let's verify the CrispyWaffle package dependencies in the project:

βœ… Verification successful

CrispyWaffle package dependencies verified.

The grouping effectively consolidates updates for CrispyWaffle packages used in the project.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for CrispyWaffle package references in the project
# Expected: Find .csproj files containing CrispyWaffle package references to confirm the grouping is useful

# Search for CrispyWaffle package references in .csproj files
fd -e csproj --exec grep -l "CrispyWaffle"

Length of output: 166

.github/workflows/deep-source.yml (1)

32-32: LGTM! Test command follows best practices.

The test command is well-structured with appropriate flags for coverage collection.

Tests/VTEX.Tests/VTEX.Tests.csproj (2)

18-18: LGTM! NSubstitute package addition looks good.

The addition of NSubstitute 5.3.0 is appropriate for the test project and aligns with the transition to a new mocking framework.


18-18: Verify complete transition from Moq

Let's ensure we're not maintaining two mocking frameworks simultaneously.

βœ… Verification successful

Complete transition from Moq verified

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining Moq references or usages

# Check for Moq package reference in any .csproj file
echo "Checking for Moq package references..."
rg -l 'PackageReference.*Include="Moq"' -g '*.csproj'

# Check for Moq usages in test files
echo "Checking for Moq usages in test files..."
rg -l 'using Moq;|Mock<|\.Setup\(|\.Verify\(' -g '*.cs' Tests/

Length of output: 298


Script:

#!/bin/bash
# Description: Comprehensive verification for any remaining Moq references or usages across the entire codebase

# Search for Moq package references in all project and solution files
echo "Searching for Moq package references in .csproj and .sln files..."
rg -l 'PackageReference\s+Include\s*=\s*"Moq"' -g '*.csproj' -g '*.sln'

# Search for 'using Moq;' directives in all C# code files
echo "Searching for 'using Moq;' in C# files..."
rg -l '^using\s+Moq;' -g '*.cs'

# Search for Moq usage patterns (Mock<, .Setup(, .Verify()) in all C# code files
echo "Searching for Moq usage patterns (Mock<, .Setup(, .Verify()) in C# files..."
rg -l 'Mock<|\.Setup\(|\.Verify\(' -g '*.cs'

Length of output: 555

.github/workflows/codacy.yml (2)

54-55: Review max-allowed-issues configuration

Setting max-allowed-issues to 2147483647 effectively disables the threshold. Consider setting a reasonable threshold based on your project's quality standards, or document why this high value is necessary.

#!/bin/bash
# Check current issue count to help determine a reasonable threshold
gh api graphql -f query='
query {
  repository(owner: "guibranco", name: "VTEX-SDK-dotnet") {
    vulnerabilityAlerts(first: 1) {
      totalCount
    }
  }
}'

43-43: Consider using a major version tag instead of commit hash

While using a commit hash is secure, it requires manual updates. Consider using a major version tag (e.g., @v5) with SHA pinning in a separate workflow dependency file for better maintainability while maintaining security.

βœ… Verification successful

Using a major version tag (e.g., @v4) is appropriate

The current latest version is v4.4.5, allowing you to switch to a major version tag for better maintainability while maintaining security with SHA pinning.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check latest version of the action
gh api repos/codacy/codacy-analysis-cli-action/releases/latest --jq .tag_name

Length of output: 226


Script:

#!/bin/bash
# Check latest release tag of codacy-analysis-cli-action
gh api repos/codacy/codacy-analysis-cli-action/releases/latest --jq .tag_name

Length of output: 86

Tests/VTEX.Tests/Health/VtexHealthClientTests.cs (3)

21-21: LGTM! NSubstitute using directive added correctly.

The addition of the NSubstitute namespace import is appropriate for the mocking framework migration.


34-38: Documentation updated accurately to reflect NSubstitute usage.

The XML comments have been properly updated to use "substitute" terminology instead of "mock", maintaining consistency with the new mocking framework.


61-67: Verify the complete migration from Moq to NSubstitute.

The test implementation has been correctly updated to use NSubstitute syntax. However, let's ensure all Moq references have been removed from the project.

βœ… Verification successful

Complete migration from Moq to NSubstitute verified.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify complete migration from Moq to NSubstitute
# Check for any remaining Moq references in the codebase

# Search for Moq using directives
echo "Checking for remaining Moq using directives..."
rg "using\s+Moq" -g "*.cs"

# Search for Mock<T> usage
echo "Checking for remaining Mock<T> usage..."
rg "Mock<" -g "*.cs"

# Search for Moq package reference in project files
echo "Checking for Moq package references..."
rg "PackageReference.*Moq" -g "*.csproj"

Length of output: 373

dotnet test -c Debug --verbosity minimal --no-build --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat="cobertura"
./bin/deepsource report --analyzer test-coverage --key csharp --value-file ./Tests/VTEX.Tests/coverage.cobertura.xml
dotnet test -c Debug --verbosity minimal --no-build --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat="cobertura"
./bin/deepsource report --analyzer test-coverage --key csharp --value-file ./Tests/VTEX.Tests/coverage.net8.0.cobertura.xml
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codebase verification

Coverage reporting is only configured for .NET 8.0.
Coverage files for netstandard2.0, netstandard2.1, and net6.0 are missing.

πŸ”— Analysis chain

Verify coverage reporting for multiple target frameworks.

The coverage file path now includes the specific framework version (net8.0). If the project targets multiple frameworks, we should ensure this doesn't miss coverage from other target frameworks.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if project targets multiple frameworks that might generate different coverage files

# Check target frameworks in the project file
echo "Checking target frameworks in VTEX.API.csproj:"
rg -A 2 "<TargetFrameworks|<DotNetVersions" Src/VTEX.API/VTEX.API.csproj

# Check if there are any other coverage files being generated
echo -e "\nChecking for other coverage file patterns:"
fd "coverage.*cobertura.xml" Tests/VTEX.Tests/

Length of output: 623


Script:

#!/bin/bash
# Description: Retrieve the value of DotNetVersions in VTEX.API.csproj

echo "Retrieving DotNetVersions from VTEX.API.csproj:"
rg "<DotNetVersions>(.*)</DotNetVersions>" Src/VTEX.API/VTEX.API.csproj --only-matching --replace '$1'

Length of output: 209


Script:

#!/bin/bash
# Description: Locate and retrieve the value of DotNetVersions across the repository

echo "Searching for the definition of DotNetVersions in the repository:"
rg "DotNetVersions.*=" --no-filename -A 1 .

Length of output: 186


Script:

#!/bin/bash
# Description: Comprehensive search for any occurrences of DotNetVersions in the repository

echo "Searching for all occurrences of DotNetVersions in the repository:"
rg "DotNetVersions" .

Length of output: 645

Comment on lines +21 to +25
"sonarlint.connectedMode.project": {
"connectionId": "guibranco-github",
"projectKey": "guibranco_VTEX-SDK-dotnet"
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix JSON syntax error

There's a missing comma after the Peacock setting, which would cause the JSON to be invalid.

Apply this fix:

    "peacock.color": "#e42760" 
+   ,
    "sonarlint.connectedMode.project": {
        "connectionId": "guibranco-github",
        "projectKey": "guibranco_VTEX-SDK-dotnet"
    }
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"peacock.color": "#e42760"
"sonarlint.connectedMode.project": {
"connectionId": "guibranco-github",
"projectKey": "guibranco_VTEX-SDK-dotnet"
}
"peacock.color": "#e42760",
"sonarlint.connectedMode.project": {
"connectionId": "guibranco-github",
"projectKey": "guibranco_VTEX-SDK-dotnet"
}
🧰 Tools
πŸͺ› Biome

[error] 22-22: expected , but instead found "sonarlint.connectedMode.project"

Remove "sonarlint.connectedMode.project"

(parse)

"peacock.color": "#e42760"
}
"peacock.color": "#e42760"
"sonarlint.connectedMode.project": {

Check warning

Code scanning / Jacksonlinter (reported by Codacy)

Unexpected character ('"' (code 34)): was expecting comma to separate Object entries Warning

Unexpected character ('"' (code 34)): was expecting comma to separate Object entries
@@ -12,8 +12,11 @@
contrib-readme-job:
runs-on: ubuntu-latest
name: Update files

permissions:

Check notice

Code scanning / Checkov (reported by Codacy)

Ensure top-level permissions are not set to write-all Note

Ensure top-level permissions are not set to write-all
@@ -1,4 +1,4 @@
name: Deploy Documentation
name: Publish Documentation

Check notice

Code scanning / Checkov (reported by Codacy)

Ensure top-level permissions are not set to write-all Note

Ensure top-level permissions are not set to write-all
@@ -23,4 +23,4 @@
fetch-depth: 0

- name: Infisical secrets check
uses: guibranco/[email protected].15
uses: guibranco/[email protected].16

Check warning

Code scanning / Semgrep (reported by Codacy)

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Warning

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
@AppVeyorBot
Copy link

❌ Build VTEX-SDK-dotnet 2.3.1730 failed (commit 8e7c8b4671 by @gstraccini[bot])

Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 1c4ea161 βœ… βˆ…
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (1c4ea16) Report Missing Report Missing Report Missing
Head commit (92e942b) 1777 4 0.23%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#374) 0 0 βˆ… (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settingsΒ Β Β Β Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct. ↩

@guibranco guibranco disabled auto-merge November 13, 2024 11:24
Copy link
Contributor

Infisical secrets check: βœ… No secrets leaked!

πŸ’» Scan logs
11:24AM INF scanning for exposed secrets...
11:24AM INF 585 commits scanned.
11:24AM INF scan completed in 301ms
11:24AM INF no leaks found

@guibranco guibranco merged commit 699ae9f into main Nov 13, 2024
19 of 23 checks passed
@guibranco guibranco deleted the guibranco-patch-1 branch November 13, 2024 11:24
@AppVeyorBot
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
β˜‘οΈ auto-merge Automatic merging of pull requests (gstraccini-bot) size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants