Skip to content

Conversation

@xperiandri
Copy link
Collaborator

@xperiandri xperiandri commented Jul 1, 2025

  • Use Fantomas and .editorconfig (my setup, I have not tried to align with the repo style)
  • Use targets to automatically restore tools and automatically format the whole repo

Copilot AI review requested due to automatic review settings July 1, 2025 14:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances project configuration by standardizing tool usage and formatting setups.

  • Introduces a Directory.Build.targets file with targets for updating, restoring, and formatting dotnet tools (including Fantomas).
  • Updates CHANGELOG.md with entries for the new .gitignore and .editorconfig files.
  • Adds supporting configuration files (.gitattributes, .git-blame-ignore-revs, .fantomasignore, .editorconfig, and .config/dotnet-tools.json) to enforce consistent formatting and tool behavior.

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Directory.Build.targets Adds targets to update, restore, and run dotnet tools including Fantomas.
CHANGELOG.md Updates changelog entries reflecting modifications to gitignore and editorconfig.
.gitattributes Adds settings for VB and shell files.
.git-blame-ignore-revs Establishes commits to ignore (e.g., formatting changes).
.fantomasignore Adds ignore settings for AssemblyInfo files to be skipped by Fantomas.
.editorconfig Provides a comprehensive set of formatting rules including Fantomas settings.
.config/dotnet-tools.json Updates tool configurations with explicit tool versions and rollForward settings.

<_BuildProjBaseIntermediateOutputPath>$(MSBuildThisFileDirectory)build/obj/</_BuildProjBaseIntermediateOutputPath>
<_DotnetToolManifestFile>$(MSBuildThisFileDirectory).config/dotnet-tools.json</_DotnetToolManifestFile>
<_DotnetToolRestoreOutputFile>$(_BuildProjBaseIntermediateOutputPath)/dotnet-tool-restore-$(NETCoreSdkVersion)-$(OS)</_DotnetToolRestoreOutputFile>
<_DotnetFantomasOutputFile>$(BaseIntermediateOutputPath)dotnet-fantomas-msbuild-$(NETCoreSdkVersion)-$(OS)</_DotnetFantomasOutputFile>
Copy link

Copilot AI Jul 1, 2025

Choose a reason for hiding this comment

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

Consider using the already defined property $(_BuildProjBaseIntermediateOutputPath) instead of $(BaseIntermediateOutputPath) for consistency with other tool-related properties.

Suggested change
<_DotnetFantomasOutputFile>$(BaseIntermediateOutputPath)dotnet-fantomas-msbuild-$(NETCoreSdkVersion)-$(OS)</_DotnetFantomasOutputFile>
<_DotnetFantomasOutputFile>$(_BuildProjBaseIntermediateOutputPath)dotnet-fantomas-msbuild-$(NETCoreSdkVersion)-$(OS)</_DotnetFantomasOutputFile>

Copilot uses AI. Check for mistakes.
@xperiandri xperiandri force-pushed the repo-config branch 4 times, most recently from 65a419a to 591900c Compare July 7, 2025 00:09
@xperiandri
Copy link
Collaborator Author

@knocte I have not tried to align the Fantomas setup to the repo style. If you have any preferences, please comment.
The formatting commit will be included in the blame ignore file to not pollute the history.
I have a PowerShell script that formats only files that are changed between the master and the current branch. I you prefer going this way instead of forcing the whole repo formatting.

@knocte
Copy link
Collaborator

knocte commented Jul 22, 2025

If you prefer going this way instead of forcing the whole repo formatting.

I actually prefer whole repo formatting, however, I was holding off doing fantomas myself because I knew that doing it right now would make a bunch of PRs have conflicts; and not just straightforward conflicts, but conflicts very annoying to resolve. Therefore I would be inclined to work on this only after we have merged a bunch of PRs that are pending (yes the DRAFT ones also count, we plan to revisit those soon).

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.

3 participants