diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 3f1c546..56a37bc 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,22 +3,25 @@ "isRoot": true, "tools": { "dotnet-reportgenerator-globaltool": { - "version": "5.1.25", + "version": "5.4.12", "commands": [ "reportgenerator" - ] + ], + "rollForward": false }, "dotnet-fsharplint": { - "version": "0.21.3", + "version": "0.26.2", "commands": [ "dotnet-fsharplint" - ] + ], + "rollForward": false }, "altcode.gendarme-tool": { - "version": "2023.8.26.15512", + "version": "2024.6.28.12460", "commands": [ "gendarme" - ] + ], + "rollForward": false } } } \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e98e974..fe2728a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,12 +14,17 @@ jobs: windows: runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5.0.0 with: fetch-depth: 2 - uses: actions/setup-dotnet@v4 with: - dotnet-version: '7.0.400' + global-json-file: global.json + cache: true + cache-dependency-path: | + **/*.csproj + **/*.fsproj + **/packages.lock.json - name: Tools run: dotnet tool restore - name: Setup diff --git a/Build/actions.fs b/Build/actions.fs index 52e959e..4b22f96 100644 --- a/Build/actions.fs +++ b/Build/actions.fs @@ -16,8 +16,7 @@ module Actions = let Clean () = let rec clean1 depth = try - (DirectoryInfo ".") - .GetDirectories("*", SearchOption.AllDirectories) + (DirectoryInfo ".").GetDirectories("*", SearchOption.AllDirectories) |> Seq.filter (fun x -> x.Name.StartsWith "_" || x.Name = "bin" diff --git a/Build/setup.fs b/Build/setup.fs index 0e78e57..919ab29 100644 --- a/Build/setup.fs +++ b/Build/setup.fs @@ -86,7 +86,6 @@ module Setup = let Preparation = (fun _ -> - RestoreMSSolutionPackages restore "./altcode.dixon.sln" Directory.ensure "./packages/fxcop/" let target = diff --git a/Build/targets.fs b/Build/targets.fs index ae7204e..3934454 100644 --- a/Build/targets.fs +++ b/Build/targets.fs @@ -322,10 +322,11 @@ module Targets = let now = DateTime.Now let time = - now - .ToString("HHmmss") - .Substring(0, 5) - .TrimStart('0') + let raw = now.ToString("HHmmss").Substring(0, 5).TrimStart('0') + if String.IsNullOrEmpty raw then + "0" + else + raw let y0 = now.Year let m0 = now.Month @@ -382,7 +383,7 @@ module Targets = let Restore = (fun _ -> - (!! "./**/*.*proj") + (!!"./**/*.*proj") |> Seq.iter (fun f -> let dir = Path.GetDirectoryName f let proj = Path.GetFileName f @@ -403,10 +404,10 @@ module Targets = proj)) let BuildRelease = - (fun _ -> "./altcode.dixon.sln" |> msbuildRelease) + (fun _ -> "./altcode.dixon.slnx" |> msbuildRelease) let BuildDebug = - (fun _ -> "./altcode.dixon.sln" |> msbuildDebug) + (fun _ -> "./altcode.dixon.slnx" |> msbuildDebug) // Code Analysis @@ -430,9 +431,8 @@ module Targets = let failOnIssuesFound (issuesFound: bool) = Assert.That(issuesFound, Is.False, "Lint issues were found") - [ !! "./**/*.fsproj" - |> Seq.sortBy (Path.GetFileName) - !! "./Build/*.fsx" |> Seq.map Path.GetFullPath ] + [ !!"./**/*.fsproj" |> Seq.sortBy (Path.GetFileName) + !!"./Build/*.fsx" |> Seq.map Path.GetFullPath ] |> Seq.concat |> Seq.map doLintAsync |> throttle @@ -759,7 +759,7 @@ module Targets = printfn "Overall coverage reporting" Directory.ensure "./_Reports/_BulkReport" - !! "./_Reports/*.xml" + !!"./_Reports/*.xml" |> Seq.filter (fun f -> not <| f.EndsWith("Report.xml", StringComparison.OrdinalIgnoreCase)) @@ -780,7 +780,7 @@ module Targets = |> String.IsNullOrWhiteSpace |> not then - (!! "./_Packagin*/*.nupkg") + (!!"./_Packagin*/*.nupkg") |> Seq.iter (fun f -> printfn "Publishing %A from %A" f currentBranch diff --git a/Directory.Packages.props b/Directory.Packages.props index 5817f16..cd902b4 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -3,7 +3,7 @@ - + @@ -12,42 +12,42 @@ - + - - - + + + - - - - - - - - - - - + + + + + + + + + + + - + - - + + - - + + - + @@ -66,7 +66,7 @@ - + \ No newline at end of file diff --git a/FakeForAltCodeDixonBuild.sln b/FakeForAltCodeDixonBuild.sln deleted file mode 100644 index f8f0612..0000000 --- a/FakeForAltCodeDixonBuild.sln +++ /dev/null @@ -1,47 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.4.33122.133 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Build", "Build\Build.fsproj", "{7B5B4F5E-768E-4451-A175-FF09CDAF8DA7}" -EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Setup", "Build\Setup.fsproj", "{01E6287A-B665-4E17-AFF2-41EDA21223FD}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{45352640-DEE0-45F0-BEDC-87ABB5D56544}" - ProjectSection(SolutionItems) = preProject - Build\build-rules.xml = Build\build-rules.xml - Directory.Build.props = Directory.Build.props - Build\Directory.Build.props = Build\Directory.Build.props - Directory.Build.targets = Directory.Build.targets - Directory.Packages.props = Directory.Packages.props - .config\dotnet-tools.json = .config\dotnet-tools.json - .github\workflows\main.yml = .github\workflows\main.yml - OutputBuildProps.props = OutputBuildProps.props - OutputBuildTargets.props = OutputBuildTargets.props - README.md = README.md - ReleaseNotes - Previously.md = ReleaseNotes - Previously.md - ReleaseNotes.md = ReleaseNotes.md - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {7B5B4F5E-768E-4451-A175-FF09CDAF8DA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7B5B4F5E-768E-4451-A175-FF09CDAF8DA7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7B5B4F5E-768E-4451-A175-FF09CDAF8DA7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7B5B4F5E-768E-4451-A175-FF09CDAF8DA7}.Release|Any CPU.Build.0 = Release|Any CPU - {01E6287A-B665-4E17-AFF2-41EDA21223FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {01E6287A-B665-4E17-AFF2-41EDA21223FD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {01E6287A-B665-4E17-AFF2-41EDA21223FD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {01E6287A-B665-4E17-AFF2-41EDA21223FD}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {7A9F3270-FE70-47BA-8D74-B7AAB7472DA6} - EndGlobalSection -EndGlobal diff --git a/FakeForAltCodeDixonBuild.slnx b/FakeForAltCodeDixonBuild.slnx new file mode 100644 index 0000000..9a4e01e --- /dev/null +++ b/FakeForAltCodeDixonBuild.slnx @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/FixCop/Program.fs b/FixCop/Program.fs index 0890abd..a0bba8f 100644 --- a/FixCop/Program.fs +++ b/FixCop/Program.fs @@ -35,9 +35,7 @@ let main argv = let verbose = System.Diagnostics.TraceLevel.Verbose - catrace - .GetProperty("TraceLevel") - .SetValue(null, verbose) + catrace.GetProperty("TraceLevel").SetValue(null, verbose) // interop info let cainterop = diff --git a/ToolUpdate.ps1 b/ToolUpdate.ps1 new file mode 100644 index 0000000..8a34f5b --- /dev/null +++ b/ToolUpdate.ps1 @@ -0,0 +1,4 @@ +& dotnet tool update dotnet-reportgenerator-globaltool +& dotnet tool update altcode.gendarme-tool +& dotnet tool update dotnet-fsharplint +& dotnet tool update -g fantomas \ No newline at end of file diff --git a/altcode.dixon.sln b/altcode.dixon.sln deleted file mode 100644 index 209a659..0000000 --- a/altcode.dixon.sln +++ /dev/null @@ -1,71 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.32014.148 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "altcode.dixon", "altcode.dixon\altcode.dixon.fsproj", "{E03BA4A3-F4DE-4D99-B771-78637706B9F7}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BuildItems", "BuildItems", "{E65D4060-66F4-4A20-9116-8442901F7FB2}" - ProjectSection(SolutionItems) = preProject - Build\actions.fsx = Build\actions.fsx - Build\altcode.dixon.nuspec = Build\altcode.dixon.nuspec - Build\build.fsx = Build\build.fsx - Build\common-rules.xml = Build\common-rules.xml - .config\dotnet-tools.json = .config\dotnet-tools.json - global.json = global.json - Build\Infrastructure.snk = Build\Infrastructure.snk - .github\workflows\main.yml = .github\workflows\main.yml - Build\setup.fsx = Build\setup.fsx - Build\targets.fsx = Build\targets.fsx - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NuGet", "Build\NuGet.csproj", "{225910EA-70DA-442C-8856-F7D17AC1AF88}" -EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "altcode.dixon.tests", "altcode.dixon.tests\altcode.dixon.tests.fsproj", "{1D77A8B0-F865-424B-9841-9EFCE086285C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "altcode.dixon.testdata", "altcode.dixon.testdata\altcode.dixon.testdata.csproj", "{AE84B091-CDA3-4E60-B743-5CFCDC9C9569}" -EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FixCop", "FixCop\FixCop.fsproj", "{39489D32-48AB-46B0-968A-244BF11EB5BC}" - ProjectSection(ProjectDependencies) = postProject - {1EE11A58-D6AC-4ED6-9005-5318E5F88760} = {1EE11A58-D6AC-4ED6-9005-5318E5F88760} - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "netstandard", "netstandard\netstandard.csproj", "{1EE11A58-D6AC-4ED6-9005-5318E5F88760}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E03BA4A3-F4DE-4D99-B771-78637706B9F7}.Debug|Any CPU.ActiveCfg = Debug|x86 - {E03BA4A3-F4DE-4D99-B771-78637706B9F7}.Debug|Any CPU.Build.0 = Debug|x86 - {E03BA4A3-F4DE-4D99-B771-78637706B9F7}.Release|Any CPU.ActiveCfg = Release|x86 - {E03BA4A3-F4DE-4D99-B771-78637706B9F7}.Release|Any CPU.Build.0 = Release|x86 - {225910EA-70DA-442C-8856-F7D17AC1AF88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {225910EA-70DA-442C-8856-F7D17AC1AF88}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1D77A8B0-F865-424B-9841-9EFCE086285C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1D77A8B0-F865-424B-9841-9EFCE086285C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1D77A8B0-F865-424B-9841-9EFCE086285C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AE84B091-CDA3-4E60-B743-5CFCDC9C9569}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AE84B091-CDA3-4E60-B743-5CFCDC9C9569}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AE84B091-CDA3-4E60-B743-5CFCDC9C9569}.Release|Any CPU.ActiveCfg = Release|Any CPU - {39489D32-48AB-46B0-968A-244BF11EB5BC}.Debug|Any CPU.ActiveCfg = Debug|x86 - {39489D32-48AB-46B0-968A-244BF11EB5BC}.Debug|Any CPU.Build.0 = Debug|x86 - {39489D32-48AB-46B0-968A-244BF11EB5BC}.Release|Any CPU.ActiveCfg = Release|x86 - {39489D32-48AB-46B0-968A-244BF11EB5BC}.Release|Any CPU.Build.0 = Release|x86 - {1EE11A58-D6AC-4ED6-9005-5318E5F88760}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1EE11A58-D6AC-4ED6-9005-5318E5F88760}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1EE11A58-D6AC-4ED6-9005-5318E5F88760}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1EE11A58-D6AC-4ED6-9005-5318E5F88760}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {225910EA-70DA-442C-8856-F7D17AC1AF88} = {E65D4060-66F4-4A20-9116-8442901F7FB2} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {34CA1585-1D7B-4153-98CE-826D630863DC} - EndGlobalSection -EndGlobal diff --git a/altcode.dixon.slnx b/altcode.dixon.slnx new file mode 100644 index 0000000..428dc83 --- /dev/null +++ b/altcode.dixon.slnx @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fsharplint.json b/fsharplint.json index b599cd7..a36159b 100644 --- a/fsharplint.json +++ b/fsharplint.json @@ -258,10 +258,7 @@ }, "typography": { "indentation": { - "enabled": false, - "config": { - "numberOfIndentationSpaces": 4 - } + "enabled": false }, "maxCharactersOnLine": { "enabled": false, diff --git a/fullbuild.ps1 b/fullbuild.ps1 new file mode 100644 index 0000000..0e3b701 --- /dev/null +++ b/fullbuild.ps1 @@ -0,0 +1,7 @@ +Set-StrictMode -Version Latest +$ErrorActionPreference = 'Stop' +Set-Location -Path $PSScriptRoot + +dotnet tool restore +dotnet run --project (Join-Path $PSScriptRoot 'Build/Setup.fsproj') +dotnet run --project (Join-Path $PSScriptRoot 'Build/Build.fsproj') \ No newline at end of file diff --git a/global.json b/global.json index 1f1bd3b..d4751a0 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "7.0.400", + "version": "9.0.304", "rollForward": "latestMinor" } } \ No newline at end of file