Skip to content

Conversation

@berezovskyi
Copy link
Member

@berezovskyi berezovskyi commented Nov 15, 2025

Summary by CodeRabbit

  • Tests

    • Configured snapshot-based verification with a test initializer and converters for consistent snapshot output.
    • Added verification tooling to test projects and new snapshot files for RDF/XML serialization and collection scenarios.
  • Chores

    • Updated repository formatting and ignore rules to preserve test artifacts.
    • Added attributes to ensure consistent text/binary handling for verified files and enabled modern project defaults in test projects.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 15, 2025

Walkthrough

Adds Verify-based snapshot testing: project/package updates, test Verify calls and a ModuleInitializer registering TTL converters for RDF graphs/resources, new .verified/.ttl snapshots, VCS attributes/ignore rules, and duplicated .editorconfig blocks for received/verified file patterns.

Changes

Cohort / File(s) Change Summary
Verification formatting & VCS rules
/.editorconfig, /.gitattributes, /.gitignore
Added EditorConfig blocks (duplicated) for *.received.{json,txt,xml,ttl,nq} and *.verified.{json,txt,xml,ttl,nq} setting charset = utf-8-bom, end_of_line = lf, disabling indent_size, indent_style, insert_final_newline, tab_width, and disabling trim_trailing_whitespace. Added .gitattributes marking *.verified.txt/.xml/.json/.ttl/.nq as text with eol=lf and working-tree-encoding=UTF-8, and *.verified.bin as binary. Added .gitignore pattern *.received.*.
Central packages
OSLC4Net_SDK/Directory.Packages.props
Added central PackageVersion entry: Verify.XunitV3 Version 31.7.1; minor closing-tag formatting adjustments.
Test project references
OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/OSLC4Net.Core.DotNetRdfProviderTests.csproj
Enabled ImplicitUsings, normalized ProjectReference formatting to single-line, and added Verify.XunitV3 package reference.
Verify initialization
OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/VerifyInit.cs
New public static VerifyInit class with a [ModuleInitializer] Initialize() registering Verify configuration: snapshot dir "Snapshots", ttl text extension, and converters for IGraph and IResource that canonicalize and serialize to TTL via CompressingTurtleWriter.
Test changes (calls)
OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/RdfXmlMediaTypeFormatterTests.cs
Added await Verify(changeRequest1); and await Verify(rdfGraph); verification calls; removed using Xunit; directive.
New snapshot: single resource (.ttl)
OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/Snapshots/RdfXmlMediaTypeFormatterTests.TestRdfXmlSerializationAsync.verified.ttl
Added TTL snapshot describing a ChangeRequest resource and an rdf:Statement assertion.
New snapshot: collection & metadata (.ttl)
OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/Snapshots/RdfXmlMediaTypeFormatterTests.TestRdfXmlCollectionSerializationAsync.verified.ttl
Added TTL snapshot for a collection of ChangeRequests including blank-node statements, rdfs:member entries, pagination/response metadata, and inter-request relationships.

Sequence Diagram(s)

sequenceDiagram
    participant Init as VerifyInit (ModuleInitializer)
    participant Test as RdfXmlMediaTypeFormatterTests
    participant Verify as Verify Library
    participant Conv as TTL Converter
    participant FS as Snapshots Storage

    Note over Init,Verify: Test verifier initialization
    Init->>Verify: Set snapshots dir "Snapshots"
    Init->>Verify: Register ".ttl" extension
    Init->>Conv: Register IGraph -> TTL converter
    Init->>Conv: Register IResource -> TTL converter

    Note over Test,Verify: Test execution
    Test->>Test: Build ChangeRequest / RDF graph(s)
    Test->>Verify: await Verify(changeRequest1)
    Verify->>Conv: Convert IResource -> canonical TTL
    Conv-->>Verify: TTL
    Verify->>FS: Compare to `.verified.ttl`
    FS-->>Verify: Match/Mismatch
    Verify-->>Test: Assertion result

    Test->>Verify: await Verify(rdfGraph)
    Verify->>Conv: Convert IGraph -> canonical TTL
    Conv-->>Verify: TTL
    Verify->>FS: Compare to `.verified.ttl` (collection)
    FS-->>Verify: Match/Mismatch
    Verify-->>Test: Assertion result
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Inspect VerifyInit converters for correct RDF canonicalization and deterministic serialization.
  • Verify csproj/package addition and ImplicitUsings for compatibility with test project.
  • Confirm .editorconfig duplication is intentional and that .gitattributes and .gitignore patterns align with repo conventions.
  • Review new snapshots for expected content/determinism.

Possibly related PRs

Poem

🐰 I nibble TTL and tidy the lot,

Graphs all canonical, snapshots caught,
I hop, I verify, then sit—quite proud,
Carrots of text, no trailing clouds,
A tiny hop for code, a joyful shout! 🎉

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding initial support for Verify test framework integration with DotNetRDF and OSLC IResource.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch b-verify

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e168c24 and 5f3f5cd.

📒 Files selected for processing (2)
  • .editorconfig (1 hunks)
  • .gitattributes (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • .editorconfig
  • .gitattributes
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: test (windows-latest, 10.x, net10.0)
  • GitHub Check: test (ubuntu-24.04-arm, 10.x, net10.0)
  • GitHub Check: test (ubuntu-24.04, 10.x, net10.0)
  • GitHub Check: Analyze (csharp)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Nov 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.55%. Comparing base (f62f549) to head (5f3f5cd).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #454   +/-   ##
=======================================
  Coverage   49.55%   49.55%           
=======================================
  Files         166      166           
  Lines       15388    15388           
  Branches     1024     1024           
=======================================
  Hits         7626     7626           
  Misses       7479     7479           
  Partials      283      283           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@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

🧹 Nitpick comments (3)
.editorconfig (1)

465-473: Snapshot formatting overrides are reasonable

Scoping relaxed formatting rules to *.{received,verified}.{json,txt,xml} is a good way to prevent IDE/formatter noise on snapshot files, while keeping the rest of the codebase strict.

If you ever add other snapshot formats (e.g., .ttl), consider extending this section or adding a similar one for those extensions.

OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/OSLC4Net.Core.DotNetRdfProviderTests.csproj (1)

7-9: ProjectReference normalization is harmless

Switching the project references onto single‑line Include entries is stylistic and doesn’t change behavior; it keeps the project file consistent and readable.

If you touch more references later, consider keeping a consistent ordering (e.g., alphabetic) to reduce diff noise.

OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/Snapshots/RdfXmlMediaTypeFormatterTests.TestRdfXmlSerializationAsync.verified.ttl (1)

1-13: TTL snapshot content looks coherent with the ChangeRequest test

The triples (subject URI, cm#affectedByDefect, cm#fixed, cm#severity, and the reified statement) match the semantics of the ChangeRequest being serialized in the test, so this snapshot should give stable, readable coverage of the RDF output.

If these vocabularies are reused in many snapshots, consider adding prefix comments or documentation somewhere to make it easier for contributors unfamiliar with the OSLC vocabulary to interpret the TTL.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f62f549 and 303f945.

📒 Files selected for processing (8)
  • .editorconfig (1 hunks)
  • .gitattributes (1 hunks)
  • .gitignore (1 hunks)
  • OSLC4Net_SDK/Directory.Packages.props (2 hunks)
  • OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/OSLC4Net.Core.DotNetRdfProviderTests.csproj (2 hunks)
  • OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/RdfXmlMediaTypeFormatterTests.cs (1 hunks)
  • OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/Snapshots/RdfXmlMediaTypeFormatterTests.TestRdfXmlSerializationAsync.verified.ttl (1 hunks)
  • OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/VerifyInit.cs (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.cs

⚙️ CodeRabbit configuration file

**/*.cs: Review the C# code against the Microsoft Framework design guidelines as well as 10 guidelines
from "Building Maintainable Software" by Joost Visser. Point out deviations and improvements.

Files:

  • OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/VerifyInit.cs
  • OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/RdfXmlMediaTypeFormatterTests.cs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Analyze (csharp)
  • GitHub Check: test (ubuntu-24.04, 10.x, net10.0)
  • GitHub Check: test (windows-latest, 10.x, net10.0)
  • GitHub Check: test (ubuntu-24.04-arm, 10.x, net10.0)
🔇 Additional comments (5)
.gitattributes (1)

1-4: Verified artifacts attributes look consistent with snapshot usage

Marking verified text files as LF/UTF‑8 and verified binaries as binary is appropriate and should avoid cross‑platform churn in snapshot tests.

.gitignore (1)

3-6: Ignoring *.received.* is appropriate for Verify artifacts

Treating *.received.* as ignored output keeps the repo clean from transient Verify snapshot files while still allowing *.verified.* to be committed.

OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/OSLC4Net.Core.DotNetRdfProviderTests.csproj (2)

4-4: Implicit usings are fine for this test project

Enabling <ImplicitUsings>enable</ImplicitUsings> is consistent with modern .NET project style and supports the LINQ/Task usage seen in the tests without extra clutter.


20-20: Package reference correctly wired to central version

Verification confirms the setup is correct: Verify.XunitV3 is referenced without a version in the csproj file and the central version 31.7.1 is properly defined in Directory.Packages.props. The package will be resolved correctly through central package management.

OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/VerifyInit.cs (1)

1-49: Verify imports are properly resolved; fix minor formatting on line 34

The Verifier and VerifierSettings types are correctly in scope through implicit usings from the Verify.XunitV3 NuGet package, which is referenced in the project's .csproj with <ImplicitUsings>enable</ImplicitUsings> configured. No additional using directives are needed.

The one small fix: remove the extra leading space on line 34 before var rdfc = new RdfCanonicalizer();.

The canonicalizedRdfDataset.OutputDataset.Graphs.Single() pattern is safe here since the GraphCollection is initialized with exactly one graph; the early-fail design is intentional and appropriate.

Copy link
Contributor

@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: 3

🧹 Nitpick comments (3)
OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/VerifyInit.cs (2)

24-41: Consider validating graph count before calling Single().

The Single() call on line 35 will throw an InvalidOperationException if the canonicalized dataset doesn't contain exactly one graph. Consider adding validation or error handling to provide a more informative error message if this assumption is violated.

Apply this diff to add validation:

             var canonicalizedRdfDataset = rdfc.Canonicalize(new TripleStore(graphCollection));
 
-            var newGraph = canonicalizedRdfDataset.OutputDataset.Graphs.Single();
+            var graphs = canonicalizedRdfDataset.OutputDataset.Graphs.ToList();
+            if (graphs.Count != 1)
+            {
+                throw new InvalidOperationException($"Expected exactly one graph after canonicalization, but found {graphs.Count}");
+            }
+            var newGraph = graphs[0];

24-62: Consider extracting duplicate canonicalization logic.

The canonicalization and serialization logic is duplicated between the IGraph and IResource converters (lines 28-39 and 48-60). Consider extracting this into a private helper method to follow the DRY principle from "Building Maintainable Software."

Example refactoring:

private static string CanonicalizeAndSerialize(IGraph graph)
{
    using var writer = new StringWriter();
    
    var rdfc = new RdfCanonicalizer();
    var graphCollection = new GraphCollection { { graph, false } };
    var canonicalizedRdfDataset = rdfc.Canonicalize(new TripleStore(graphCollection));
    
    var newGraph = canonicalizedRdfDataset.OutputDataset.Graphs.Single();
    
    var ttlWriter = new VDS.RDF.Writing.CompressingTurtleWriter();
    ttlWriter.Save(newGraph, writer);
    return writer.ToString();
}

Then simplify the converters:

VerifierSettings.RegisterFileConverter<IGraph>((graph, context) =>
{
    var serialized = CanonicalizeAndSerialize(graph);
    return new(null, "ttl", serialized);
});

VerifierSettings.RegisterFileConverter<IResource>((resource, context) =>
{
    var graph = DotNetRdfHelper.CreateDotNetRdfGraph([resource]);
    var serialized = CanonicalizeAndSerialize(graph);
    return new(null, "ttl", serialized);
});
OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/Snapshots/RdfXmlMediaTypeFormatterTests.TestRdfXmlCollectionSerializationAsync.verified.ttl (1)

1-3: Standard RDF prefixes are correctly defined.

The prefix declarations for rdf, rdfs, and xsd are standard and properly formatted.

Consider adding OSLC namespace prefixes for better readability:

 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
 @prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
+@prefix oslc: <http://open-services.net/ns/core#>.
+@prefix oslc_cm: <http://open-services.net/ns/cm#>.
+@prefix dcterms: <http://purl.org/dc/terms/>.

This would make the URIs in lines 5-27 more concise (e.g., oslc_cm:affectedByDefect instead of <http://open-services.net/ns/cm#affectedByDefect>).

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 303f945 and e168c24.

📒 Files selected for processing (3)
  • OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/RdfXmlMediaTypeFormatterTests.cs (2 hunks)
  • OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/Snapshots/RdfXmlMediaTypeFormatterTests.TestRdfXmlCollectionSerializationAsync.verified.ttl (1 hunks)
  • OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/VerifyInit.cs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/RdfXmlMediaTypeFormatterTests.cs
🧰 Additional context used
📓 Path-based instructions (1)
**/*.cs

⚙️ CodeRabbit configuration file

**/*.cs: Review the C# code against the Microsoft Framework design guidelines as well as 10 guidelines
from "Building Maintainable Software" by Joost Visser. Point out deviations and improvements.

Files:

  • OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/VerifyInit.cs
🪛 GitHub Check: Format (dotnet format)
OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/VerifyInit.cs

[warning] 16-16:
Avoid multiple blank lines

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: test (windows-latest, 10.x, net10.0)
  • GitHub Check: test (ubuntu-24.04, 10.x, net10.0)
  • GitHub Check: test (ubuntu-24.04-arm, 10.x, net10.0)
  • GitHub Check: Analyze (csharp)
🔇 Additional comments (2)
OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/Snapshots/RdfXmlMediaTypeFormatterTests.TestRdfXmlCollectionSerializationAsync.verified.ttl (2)

5-14: Reified statements correctly represent bidirectional relationships.

The blank nodes represent reified RDF statements that mirror the direct affectedByDefect triples in lines 15 and 19. This appears intentional for testing the serializer's handling of reified statements and relationship metadata.


15-22: ChangeRequest resources are well-formed and consistent.

The two ChangeRequest resources correctly represent:

  • Bidirectional affectedByDefect relationships (consistent with the reified statements)
  • Distinct fixed boolean values (true/false)
  • Appropriate OSLC CM properties and types

Comment on lines +23 to +27
<http://com/somewhere/changerequests> rdfs:member <http://com/somewhere/changeRequest1>,
<http://com/somewhere/changeRequest2>.
<http://com/somewhere/changerequests?page=20> <http://open-services.net/ns/core#nextPage> <http://com/somewhere/changerequests?page=21>;
<http://open-services.net/ns/core#totalCount> "2";
a <http://open-services.net/ns/core#ResponseInfo>.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

Verify totalCount data type against OSLC specification.

The collection and pagination structure are correct, but line 26 has totalCount as an untyped string literal "2" rather than a typed integer. According to OSLC Core specifications, totalCount should typically be an xsd:integer.

Please verify whether the serializer is correctly outputting type information for numeric properties. Check the OSLC Core specification for the expected data type of oslc:totalCount.

If the spec requires xsd:integer, the expected output should be:

-<http://com/somewhere/changerequests?page=20> <http://open-services.net/ns/core#nextPage> <http://com/somewhere/changerequests?page=21>;
-                                              <http://open-services.net/ns/core#totalCount> "2";
-                                              a <http://open-services.net/ns/core#ResponseInfo>.
+<http://com/somewhere/changerequests?page=20> <http://open-services.net/ns/core#nextPage> <http://com/somewhere/changerequests?page=21>;
+                                              <http://open-services.net/ns/core#totalCount> "2"^^xsd:integer;
+                                              a <http://open-services.net/ns/core#ResponseInfo>.

🌐 Web query:

OSLC Core specification totalCount data type xsd:integer

💡 Result:

Yes — OSLC Core defines oslc:totalCount as an integer (zero-or-one, optional). Its value SHOULD be non‑negative and, for query responses, SHOULD represent the total number of matching results. [1][2]

Sources:

  • OSLC Core — Vocabulary (totalCount = integer; SHOULD be non‑negative). [1]
  • OSLC Core — ResponseInfo shape (oslc:totalCount value-type: integer; occurrence: zero-or-one). [2]

Fix totalCount serialization to include xsd:integer type annotation.

Line 26 has totalCount as an untyped string literal "2", but OSLC Core defines oslc:totalCount as an integer (zero-or-one, optional). The RDF serializer should output the value with explicit type annotation:

-<http://com/somewhere/changerequests?page=20> <http://open-services.net/ns/core#nextPage> <http://com/somewhere/changerequests?page=21>;
-                                              <http://open-services.net/ns/core#totalCount> "2";
+<http://com/somewhere/changerequests?page=20> <http://open-services.net/ns/core#nextPage> <http://com/somewhere/changerequests?page=21>;
+                                              <http://open-services.net/ns/core#totalCount> "2"^^xsd:integer;
📝 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
<http://com/somewhere/changerequests> rdfs:member <http://com/somewhere/changeRequest1>,
<http://com/somewhere/changeRequest2>.
<http://com/somewhere/changerequests?page=20> <http://open-services.net/ns/core#nextPage> <http://com/somewhere/changerequests?page=21>;
<http://open-services.net/ns/core#totalCount> "2";
a <http://open-services.net/ns/core#ResponseInfo>.
<http://com/somewhere/changerequests> rdfs:member <http://com/somewhere/changeRequest1>,
<http://com/somewhere/changeRequest2>.
<http://com/somewhere/changerequests?page=20> <http://open-services.net/ns/core#nextPage> <http://com/somewhere/changerequests?page=21>;
<http://open-services.net/ns/core#totalCount> "2"^^xsd:integer;
a <http://open-services.net/ns/core#ResponseInfo>.

Comment on lines +14 to +21
// Verifier.UseProjectRelativeDirectory("Snapshots");
Verifier.UseSourceFileRelativeDirectory("Snapshots");


// VerifierSettings.AddExtraSettings(
// _ => _.TypeNameHandling = TypeNameHandling.All);
// VerifierSettings.AddScrubber(_ => _.Replace("String to verify", "new value"));

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Remove commented code and extra blank lines.

The commented code (lines 14, 18-20) should either be removed or documented with a TODO/NOTE explaining why it's retained. Additionally, the multiple blank lines (16-17) flagged by static analysis should be reduced to a single blank line.

Apply this diff to clean up the code:

-        // Verifier.UseProjectRelativeDirectory("Snapshots");
         Verifier.UseSourceFileRelativeDirectory("Snapshots");
 
-
-        // VerifierSettings.AddExtraSettings(
-        //     _ => _.TypeNameHandling = TypeNameHandling.All);
-        // VerifierSettings.AddScrubber(_ => _.Replace("String to verify", "new value"));
-
         FileExtensions.AddTextExtension("ttl");
📝 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
// Verifier.UseProjectRelativeDirectory("Snapshots");
Verifier.UseSourceFileRelativeDirectory("Snapshots");
// VerifierSettings.AddExtraSettings(
// _ => _.TypeNameHandling = TypeNameHandling.All);
// VerifierSettings.AddScrubber(_ => _.Replace("String to verify", "new value"));
Verifier.UseSourceFileRelativeDirectory("Snapshots");
FileExtensions.AddTextExtension("ttl");
🧰 Tools
🪛 GitHub Check: Format (dotnet format)

[warning] 16-16:
Avoid multiple blank lines

🤖 Prompt for AI Agents
In OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/VerifyInit.cs around
lines 14 to 21, remove the commented-out Verifier.UseProjectRelativeDirectory
line and the commented VerifierSettings/AddScrubber block (or replace them with
a single TODO/NOTE comment if they must be retained), and collapse the multiple
blank lines into a single blank line so there is only one empty line between
statements; ensure no lingering commented code remains unless explicitly
documented with a concise TODO/NOTE explaining why it is kept.


// https://www.w3.org/TR/rdf-canon/ prescribes N-Quads serialization, but let's try Turtle for better readability
var ttlWriter = new VDS.RDF.Writing.CompressingTurtleWriter();
// ttlWriter.Save(graph, writer);
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Remove commented out code.

Line 59 contains commented code that should be removed to improve code clarity.

Apply this diff:

             var ttlWriter = new VDS.RDF.Writing.CompressingTurtleWriter();
-            // ttlWriter.Save(graph, writer);
             ttlWriter.Save(newGraph, writer);
📝 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
// ttlWriter.Save(graph, writer);
var ttlWriter = new VDS.RDF.Writing.CompressingTurtleWriter();
ttlWriter.Save(newGraph, writer);
🤖 Prompt for AI Agents
In OSLC4Net_SDK/Tests/OSLC4Net.Core.DotNetRdfProviderTests/VerifyInit.cs around
line 59, remove the commented-out line "// ttlWriter.Save(graph, writer);" to
clean up dead code; simply delete that commented line so the file contains only
active, relevant code and no leftover commented statements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants