Skip to content

Commit

Permalink
Replace clang format with dotnet format for C# files (#30377)
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-lebot authored Oct 23, 2024
1 parent 3527f13 commit 58a515b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
10 changes: 9 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,16 @@ repos:
description: clang-format
entry: 'inv pre-commit.check-winclang-format'
language: system
types_or: [c, c++, c#]
types_or: [c, c++]
pass_filenames: false
- # dotnet format is available on Linux, see https://learn.microsoft.com/en-us/dotnet/core/install/linux
id: dotnet-format-installer
name: dotnet-format-installer
description: Format .net file of the MSI installer
language: system
# The dotnet format tool requires a solution file to operate.
entry: dotnet format ./tools/windows/DatadogAgentInstaller --include
types: [c#]
- id: go-mod-tidy
name: go-mod-tidy
description: check that all go.mod files are tidy
Expand Down
8 changes: 7 additions & 1 deletion tools/windows/DatadogAgentInstaller/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
indent_style = space
tab_width = 4
indent_size = 4
end_of_line = crlf

# unset = native (let the platform decide)
# see https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties#end_of_line
# > 'if you want to use native line endings between different operating systems it is better not to set this option and leave that task to the VCS'
# and
# https://github.com/editorconfig/editorconfig/issues/226
# end_of_line = crlf

#### .NET Coding Conventions ####

Expand Down

0 comments on commit 58a515b

Please sign in to comment.