Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .coderabbit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ reviews:
path_instructions:
- path: "**/*.cs"
instructions: |
Review the C# code against the Microsoft Framework design guidelines as well as 10 guidelines
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.
- path: "**/*.md"
instructions: |
Expand Down
12 changes: 10 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.3
rev: v8.30.0
hooks:
- id: gitleaks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v6.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: local
hooks:
- id: dotnet-format
name: dotnet format (whitespace + style, verify only)
entry: bash -c 'cd OSLC4Net_SDK && dotnet format whitespace . --verify-no-changes && dotnet format style . --verify-no-changes --no-restore'
language: system
pass_filenames: false
files: '\.cs$'
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"dotnet.defaultSolution": "OSLC4Net_SDK/OSLC4Net.Core.slnx"
}
}
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@
"problemMatcher": "$msCompile"
}
]
}
}
15 changes: 13 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ Do not inline the `AGENT_BUILD` variable!

You must be CD'd into `OSLC4Net_SDK` or subfolder before running `dotnet` commands.

Run `dotnet format` before commit.

### Test Filters

Running TUnit via `dotnet run` supports test filters.
Expand Down Expand Up @@ -99,6 +97,19 @@ TUnit also supports filtering by your own [properties](https://thomhurst.github.

And if your test had a property with the name "MyFilterName" and its value contained "SomeValue", then your test would be executed.

## Formatting (required before every commit)

Run from the repo root:

```bash
dotnet format whitespace ./OSLC4Net_SDK && dotnet format style ./OSLC4Net_SDK --no-restore
```
Comment on lines +102 to +106
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Conflicting command location guidance in this file

Line 102 says to run from repo root, but Line 57 says you must be inside OSLC4Net_SDK before running dotnet commands. Please make these instructions consistent in one direction to avoid developer confusion.

As per coding guidelines AGENTS.md: “Document agent implementations and capabilities in AGENTS.md file”.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` around lines 102 - 106, The two conflicting instructions (the
dotnet format command that uses ./OSLC4Net_SDK and the earlier note that says
you must be inside OSLC4Net_SDK) should be reconciled: pick one consistent
workflow and update the text accordingly—either change the command to run
without the relative path when instructing "run from repo root" or change the
guidance to "cd into OSLC4Net_SDK" and remove the ./OSLC4Net_SDK prefix; update
the examples (the dotnet format whitespace ... and dotnet format style ...
--no-restore) and the prior sentence referencing being inside OSLC4Net_SDK so
both reflect the same location guidance.


- Use `whitespace` + `style` only. Skip `analyzers` — it runs third-party rules (Meziantou etc.) and is slow/noisy.
- `--no-restore` on the second call avoids a redundant restore.
- Also run this **after resolving merge conflicts**. Hand-edited hunks re-introduce style drift even when both parents were clean.
- A pre-commit hook (`.pre-commit-config.yaml`) enforces this; install once with `pre-commit install`.

## Project Structure

- `OSLC4Net_SDK/` - Main SDK projects (.NET 10)
Expand Down
1 change: 1 addition & 0 deletions CLAUDE.md
2 changes: 1 addition & 1 deletion OSLC4Net_SDK/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
"rollForward": false
}
}
}
}
2 changes: 1 addition & 1 deletion OSLC4Net_SDK/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ README.md
!.git/HEAD
!.git/config
!.git/packed-refs
!.git/refs/heads/**
!.git/refs/heads/**
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompanies this distribution.
*
*
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompanies this distribution.
*
*
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
Expand Down Expand Up @@ -59,7 +59,7 @@ public JazzFormAuthClient(String url, String user, String password, ILogger<Oslc
/// Create a new Jazz Form Auth client for the given URL, user and password
/// </summary>
/// <param name="url">the URL of the Jazz server, including the web app context</param>
/// <param name="authUrl">the base URL to use for authentication. This is normally the
/// <param name="authUrl">the base URL to use for authentication. This is normally the
/// application base URL for RQM and RTC and is the JTS application URL for fronting
/// applications like RRC and DM.</param>
/// <param name="user"></param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompanies this distribution.
*
*
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
Expand Down
4 changes: 2 additions & 2 deletions OSLC4Net_SDK/Examples/OSLC4Net.Client.Samples/ERMSample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompanies this distribution.
*
*
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
Expand All @@ -30,7 +30,7 @@ namespace OSLC4Net.Client.Samples;

/// <summary>
/// Samples of logging in to Enterprise Requirements Management (ERM) and running OSLC operations
///
///
/// - run an OSLC Requirement query and retrieve OSLC Requirements and display results
/// - demonstrate query result pagination and member enumeration
/// </summary>
Expand Down
10 changes: 5 additions & 5 deletions OSLC4Net_SDK/Examples/OSLC4Net.Client.Samples/ETMSample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompanies this distribution.
*
*
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
Expand All @@ -27,7 +27,7 @@ namespace OSLC4Net.Client.Samples;

/// <summary>
/// Samples of logging in to Enterprise Test Management (ETM) and running OSLC operations
///
///
/// - run an OLSC TestResult query and retrieve OSLC TestResults and de-serialize them as .NET objects
/// - retrieve an OSLC TestResult and print it as XML
/// - create a new TestCase
Expand Down Expand Up @@ -137,8 +137,8 @@ async Task RunAsync(string webContextUrl, string user, string passwd, string pro

Logger.LogInformation("\n------------------------------\n");

//SCENARIO B: Run a query for a specific TestResult selecting only certain
//attributes and then print it as raw XML. Change the dcterms:title below to match a
//SCENARIO B: Run a query for a specific TestResult selecting only certain
//attributes and then print it as raw XML. Change the dcterms:title below to match a
//real TestResult in your ETM project area
OslcQueryParameters queryParams2 = new OslcQueryParameters();
queryParams2.SetWhere("dcterms:title=\"Consistent_display_of_currency_Firefox_DB2_WAS_Windows_S1\"");
Expand Down Expand Up @@ -169,7 +169,7 @@ async Task RunAsync(string webContextUrl, string user, string passwd, string pro
String testcaseLocation = creationResponse.Headers.Location.ToString();
Logger.LogInformation("Test Case created a location {Location}", testcaseLocation);

//Get the test case from the service provider and update its title property
//Get the test case from the service provider and update its title property
testcase = await (await client.GetResourceRawAsync(testcaseLocation,
OslcMediaType.APPLICATION_RDF_XML).ConfigureAwait(false)).Content.ReadAsAsync<TestCase>(client.GetFormatters()).ConfigureAwait(false);
testcase.SetTitle(testcase.GetTitle() + " (updated)");
Expand Down
9 changes: 4 additions & 5 deletions OSLC4Net_SDK/Examples/OSLC4Net.Client.Samples/EWMSample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompanies this distribution.
*
*
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
Expand All @@ -27,8 +27,8 @@ namespace OSLC4Net.Client.Samples;

/// <summary>
/// Samples of logging in to Enterprise Workflow Management (EWM) and running OSLC operations
///
///
///
///
/// - run an OLSC ChangeRequest query and retrieve OSLC ChangeRequests and de-serialize them as .NET objects
/// - retrieve an OSLC ChangeRequest and print it as XML
/// - create a new ChangeRequest
Expand Down Expand Up @@ -390,7 +390,7 @@ protected override void PrintResourceInfo(ChangeRequest cr)
foreach (var val in values)
{
Logger.LogInformation("Found allowed value >{}<", val);
// Skip empty or whitespace values
// Skip empty or whitespace values
// if (!val.Contains("Unassigned", StringComparison.OrdinalIgnoreCase))
// {
// Logger.LogInformation("Resolved Filed Against category: {Category}", val);
Expand Down Expand Up @@ -427,4 +427,3 @@ protected override void PrintResourceInfo(ChangeRequest cr)
}
}
}

1 change: 0 additions & 1 deletion OSLC4Net_SDK/Examples/OSLC4Net.Client.Samples/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,3 @@ static async Task Main(string[] args)
}
}
}

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Reflection;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("OSLC4Net.Client.Samples")]
Expand All @@ -13,8 +13,8 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

Expand All @@ -24,11 +24,11 @@
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected async Task ProcessCurrentPageAsync(OslcQueryResult result, OslcClient

try
{
//Get a single artifact by its URL
//Get a single artifact by its URL
HttpResponseMessage response = await client.GetResourceRawAsync(resultsUrl, OSLCConstants.CT_RDF).ConfigureAwait(false);

if (response != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ RUN dotnet publish "./OSLC4NetExamples.Server.NetCoreApi.csproj" -c $BUILD_CONFI
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "OSLC4NetExamples.Server.NetCoreApi.dll"]
ENTRYPOINT ["dotnet", "OSLC4NetExamples.Server.NetCoreApi.dll"]
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,3 @@ public string ToXml()
}
}
}

9 changes: 4 additions & 5 deletions OSLC4Net_SDK/Examples/scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This directory contains test scripts for the OSLC4Net client samples targeting E

The OSLC4Net samples have been renamed from legacy IBM product names to current product names:
- **RTC** (Rational Team Concert) → **EWM** (Enterprise Workflow Management)
- **RRC** (Rational Requirements Composer) → **ERM** (Enterprise Requirements Management)
- **RRC** (Rational Requirements Composer) → **ERM** (Enterprise Requirements Management)
- **RQM** (Rational Quality Manager) → **ETM** (Enterprise Test Management)

## Setup
Expand Down Expand Up @@ -40,15 +40,15 @@ The test scripts will:
```

This tests:
- **EWM** (Enterprise Workflow Management)
- **EWM** (Enterprise Workflow Management)
- Queries for open change requests
- Creates, updates, and retrieves change requests
- **ERM** (Enterprise Requirements Management)
- Creates requirements with different types
- Builds requirement collections
- Queries requirements by various criteria
- **ETM** (Enterprise Test Management)
- Queries for passed test results
- Queries for passed test results
- Creates and updates test cases

### Test against Nordic (IBM Cloud instance)
Expand Down Expand Up @@ -101,7 +101,7 @@ dotnet run --project ../OSLC4Net.Client.Samples/ -- etm `
### Sample Classes
Located in `../OSLC4Net.Client.Samples/`:
- `EWMSample.cs` - Demonstrates OSLC 2.0 Change Management operations
- `ERMSample.cs` - Demonstrates OSLC 2.0 Requirements Management operations
- `ERMSample.cs` - Demonstrates OSLC 2.0 Requirements Management operations
- `ETMSample.cs` - Demonstrates OSLC 2.0 Quality Management operations

### Program Architecture
Expand Down Expand Up @@ -136,4 +136,3 @@ Located in `../OSLC4Net.Client.Samples/`:
- See `lyo-samples` repository for similar Java samples
- [OSLC Specifications](http://open-services.net/)
- [Eclipse Lyo Documentation](https://projects.eclipse.org/projects/technology.lyo)

Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeEditing/Localization/Localizable/@EntryValue">No</s:String></wpf:ResourceDictionary>
<s:String x:Key="/Default/CodeEditing/Localization/Localizable/@EntryValue">No</s:String></wpf:ResourceDictionary>
1 change: 0 additions & 1 deletion OSLC4Net_SDK/OSLC4Net.Client/Oslc/OslcClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -893,4 +893,3 @@ public void Dispose()
_client.Dispose();
}
}

16 changes: 8 additions & 8 deletions OSLC4Net_SDK/OSLC4Net.Core.Query/Grammars/OslcOrderBy.g
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompanies this distribution.
* and Eclipse Distribution License v. 1.0 which accompanies this distribution.
*
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* Contributors:
*
* Steve Pitchke - initial API and implementation
*******************************************************************************/
Expand All @@ -33,18 +33,18 @@ tokens {
this(new CommonTokenStream(new OslcOrderByLexer(new ANTLRStringStream(orderBy))))
{
}

public object Result
{
get { return oslc_order_by().Tree; }
}
}

oslc_order_by : sort_terms
oslc_order_by : sort_terms
;

sort_terms : sort_term ( ',' sort_term )* -> ^( 'terms' sort_term (sort_term)* )
;
;

sort_term : scoped_sort_term | DIRECTION identifier -> ^( 'simple_term' identifier DIRECTION )
;
Expand Down Expand Up @@ -77,7 +77,7 @@ PNAME_LN
;


DIRECTION
DIRECTION
: PLUS
| MINUS
;
Expand All @@ -92,7 +92,7 @@ PN_CHARS
: PN_CHARS_U
| MINUS
| DIGIT
| '\u00B7'
| '\u00B7'
| '\u0300'..'\u036F'
| '\u203F'..'\u2040'
;
Expand Down
Loading
Loading