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 .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"fixie.console": {
"version": "4.1.0",
"version": "4.2.0",
"commands": [
"fixie"
],
Expand Down
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PATH_add bin
22 changes: 0 additions & 22 deletions .github/release-drafter.yml

This file was deleted.

File renamed without changes.
57 changes: 57 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI/CD

on:
push:
branches:
- master
paths:
- 'source/**'
- 'tests/**'
- 'tools/**'
- '.github/workflows/**'
- 'Directory.Build.props'
- 'Directory.Packages.props'
pull_request:
branches:
- master
paths:
- 'source/**'
- 'tests/**'
- 'tools/**'
- '.github/workflows/**'
- 'Directory.Build.props'
- 'Directory.Packages.props'
release:
types: [published] # Triggered when a release is published via GitHub Releases UI or gh CLI
workflow_dispatch:

jobs:
ci:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'

- name: Run CI Pipeline
run: |
if [ "${{ github.event_name }}" == "release" ] || [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
dotnet run --file tools/dev-cli/dev.cs -- workflow --api-key "${{ secrets.PUBLISH_TO_NUGET_ORG }}"
else
dotnet run --file tools/dev-cli/dev.cs -- workflow
fi

- name: Upload Artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: Packages-${{ github.run_number }}
path: artifacts/packages/*.nupkg
if-no-files-found: ignore
3 changes: 3 additions & 0 deletions BannedSymbols.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

T:System.Console;Prefer injecting ITerminal. TimeWarp.Terminal.Terminal static class is available for migration.
T:System.Diagnostics.ProcessStartInfo;Use TimeWarp.Amuru Shell.Builder instead. See the 'amuru' skill for usage patterns.
25 changes: 10 additions & 15 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Project>

<Project>
<!-- Custom path definitions for repository structure -->
<PropertyGroup Label="Custom Repository Variables">
<RepositoryName>timewarp-options-validation</RepositoryName>
Expand All @@ -11,19 +10,15 @@
<ArtifactsDirectory>$(RepositoryRoot)artifacts/</ArtifactsDirectory>
<PackagesDirectory>$(ArtifactsDirectory)packages/</PackagesDirectory>
</PropertyGroup>

<!-- MSBuild and NuGet behavior configuration -->
<PropertyGroup Label="MSBuild/NuGet Configuration">
<!-- Output packages to our local feed directory -->
<PackageOutputPath>$(PackagesDirectory)</PackageOutputPath>

<!-- Central package management -->
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>

<!-- Suppress .NET preview SDK message -->
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
</PropertyGroup>

<!-- Default language and framework settings for all projects -->
<PropertyGroup Label="Project Defaults">
<TargetFramework>net10.0</TargetFramework>
Expand All @@ -33,7 +28,6 @@
<IsPackable>false</IsPackable>
<EnablePreviewFeatures>true</EnablePreviewFeatures>
</PropertyGroup>

<!-- Code quality, analyzers, and warning configuration -->
<PropertyGroup Label="Code Quality and Analysis">
<!-- Treat all warnings as errors -->
Expand All @@ -43,17 +37,13 @@
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>All</AnalysisMode>
<AnalysisLevel>latest-all</AnalysisLevel>

<!-- Report analyzer diagnostics in build output -->
<ReportAnalyzer>true</ReportAnalyzer>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>

<!-- Generate XML documentation files -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>

<!-- Emit compiler generated files for source generators -->
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>

<!-- Suppress specific warnings -->
<!-- CA1014: CLS compliance not required for this library -->
<!-- CA1031: Catch general exceptions (needed for validation error handling) -->
Expand All @@ -66,9 +56,8 @@
<!-- CA1852: Seal types (not applicable for test base classes) -->
<!-- CA2007: ConfigureAwait (not needed for console applications and tests) -->
<!-- RCS1102: Make class static (test classes with static methods are discovered by Fixie) -->
<NoWarn>$(NoWarn);CA1014;CA1031;CA1052;CA1515;CA1707;CA1724;CA1812;CA1848;CA1852;CA2007;RCS1102</NoWarn>
<NoWarn>$(NoWarn);CA1014;CA1031;CA1052;CA1515;CA1707;CA1724;CA1812;CA1848;CA1852;CA2007;RCS1102</NoWarn>
</PropertyGroup>

<!-- Code analyzers applied to all projects -->
<ItemGroup Label="Code Analyzers">
<PackageReference Include="Roslynator.Analyzers" PrivateAssets="all" />
Expand All @@ -77,5 +66,11 @@
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" PrivateAssets="all" />
</ItemGroup>

</Project>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)BannedSymbols.txt" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="TimeWarp.Build.Tasks" PrivateAssets="all" />
</ItemGroup>
</Project>
46 changes: 21 additions & 25 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,45 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<!-- MSBuild and NuGet behavior configuration -->
<PropertyGroup Label="MSBuild/NuGet Configuration">
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup Label="Microsoft Extensions">
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="9.0.10" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.10" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.10" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.10" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.10" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.10" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.10" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="10.0.8" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.8" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.8" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.8" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.8" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="10.0.8" />
<PackageVersion Include="Shouldly" Version="4.3.0" />
<PackageVersion Include="TimeWarp.Build.Tasks" Version="1.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageVersion>
<PackageVersion Include="TimeWarp.SourceGenerators" Version="1.0.0-beta.7" />
</ItemGroup>
<ItemGroup Label="Dev CLI">
<PackageVersion Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4" />
<PackageVersion Include="TimeWarp.Nuru" Version="3.0.0-beta.70" />
<PackageVersion Include="TimeWarp.Amuru" Version="1.0.0-beta.34" />
<PackageVersion Include="TimeWarp.Terminal" Version="1.0.0-beta.13" />
</ItemGroup>
<ItemGroup Label="FluentValidation">
<PackageVersion Include="FluentValidation" Version="12.0.0" />
<PackageVersion Include="FluentValidation" Version="12.1.1" />
</ItemGroup>
<ItemGroup Label="Testing">
<PackageVersion Include="FakeItEasy" Version="7.3.1" />
<PackageVersion Include="Fixie" Version="3.4.0" />
<PackageVersion Include="Fixie.TestAdapter" Version="4.1.0" />
<PackageVersion Include="FluentAssertions" Version="8.8.0" />
<PackageVersion Include="MediatR" Version="11.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.10" />
<PackageVersion Include="Fixie.TestAdapter" Version="4.2.0" />
<PackageVersion Include="TimeWarp.Fixie" Version="3.1.0" />
</ItemGroup>
<ItemGroup Label="Code Analyzers">
<PackageVersion Include="Roslynator.Analyzers" Version="4.14.1" />
<PackageVersion Include="Roslynator.CodeAnalysis.Analyzers" Version="4.14.1" />
<PackageVersion Include="Roslynator.Formatting.Analyzers" Version="4.14.1" />
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="4.14.0" />
</ItemGroup>
<ItemGroup Label="Roslyn Analyzer Dependencies">
<PackageVersion Include="Microsoft.CodeAnalysis" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.14.0" />
<PackageVersion Include="Roslynator.Analyzers" Version="4.15.0" />
<PackageVersion Include="Roslynator.CodeAnalysis.Analyzers" Version="4.15.0" />
<PackageVersion Include="Roslynator.Formatting.Analyzers" Version="4.15.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="10.0.300" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="5.3.0" />
</ItemGroup>
</Project>
</Project>
Empty file added documentation/.gitkeep
Empty file.
Empty file added kanban/archived/.gitkeep
Empty file.
Empty file added kanban/backlog/.gitkeep
Empty file.
14 changes: 14 additions & 0 deletions msbuild/repository.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project>
<PropertyGroup Label="Repository Structure">
<RepositoryName>timewarp-options-validation</RepositoryName>
<RepositoryRoot>$(MSBuildThisFileDirectory)../</RepositoryRoot>
<SourceDirectory>$(RepositoryRoot)source/</SourceDirectory>
<TestsDirectory>$(RepositoryRoot)tests/</TestsDirectory>
<SamplesDirectory>$(RepositoryRoot)samples/</SamplesDirectory>
<BenchmarksDirectory>$(RepositoryRoot)benchmarks/</BenchmarksDirectory>
<RunfilesDirectory>$(RepositoryRoot)runfiles/</RunfilesDirectory>
<ToolsDirectory>$(RepositoryRoot)tools/</ToolsDirectory>
<ArtifactsDirectory>$(RepositoryRoot)artifacts/</ArtifactsDirectory>
<PackagesDirectory>$(ArtifactsDirectory)packages/</PackagesDirectory>
</PropertyGroup>
</Project>
Empty file added skills/.gitkeep
Empty file.
3 changes: 1 addition & 2 deletions source/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<!-- Default package metadata (can be overridden in individual projects) -->
<PropertyGroup Label="Package Metadata">
<PackageVersion>1.0.0-beta.4</PackageVersion>
<Version>1.0.0-beta.5</Version>
<Authors>Steven T. Cramer</Authors>
<Company>TimeWarp Enterprises</Company>
<Product>TimeWarp.OptionsValidation</Product>
Expand Down Expand Up @@ -32,7 +32,6 @@
</ItemGroup>

<ItemGroup Label="Build Tasks">
<PackageReference Include="TimeWarp.Build.Tasks" />
<PackageReference Include="TimeWarp.SourceGenerators" />
</ItemGroup>

Expand Down
29 changes: 29 additions & 0 deletions tools/dev-cli/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />

<PropertyGroup>
<!-- Suppress warnings that don't apply to CLI tools -->
<NoWarn>$(NoWarn);CA1031;CA1303;CA1508;CA1515;CA1849;CA2007;CA2016;CA2000;RCS1046</NoWarn>

<!-- AOT Support -->
<PublishAot>true</PublishAot>
<InvariantGlobalization>true</InvariantGlobalization>

<!-- Enable interceptors for TimeWarp.Nuru source generator -->
<InterceptorsNamespaces>$(InterceptorsNamespaces);TimeWarp.Nuru.Generated</InterceptorsNamespaces>
</PropertyGroup>

<ItemGroup>
<!-- Include command files in compilation -->
<Compile Include="global-usings.cs" />
<Compile Include="endpoints/**/*.cs" />
</ItemGroup>

<ItemGroup>
<!-- Package references -->
<PackageReference Include="TimeWarp.Nuru" />
<PackageReference Include="TimeWarp.Amuru" />
<PackageReference Include="TimeWarp.Terminal" />
</ItemGroup>

</Project>
31 changes: 31 additions & 0 deletions tools/dev-cli/dev.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/dotnet --
// ═══════════════════════════════════════════════════════════════════════════════
// DEV CLI - timewarp-options-validation DEVELOPMENT TOOL
// ═══════════════════════════════════════════════════════════════════════════════
//
// Usage:
// As runfile: dotnet run tools/dev-cli/dev.cs -- <command>
// As AOT: ./bin/dev <command>
//
// Run `./bin/dev --help` for available commands.
//
// To bootstrap:
// dotnet run tools/dev-cli/dev.cs -- self-install
// direnv allow
// dev --help
// ═══════════════════════════════════════════════════════════════════════════════

#region Purpose
// Entry point for the dev CLI
#endregion
#region Design
// Thin wrapper around TimeWarp.Nuru to execute development commands
#endregion

NuruApp app = NuruApp.CreateBuilder()
.WithName("dev")
.WithDescription("Development CLI for timewarp-options-validation")
.DiscoverEndpoints()
.Build();

return await app.RunAsync(args);
Loading
Loading