Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit fa28d63

Browse files
authored
Update graph cli core version (#250)
* Update graph cli core version * Add git attributes * Update generated code. (#251) Schema version: microsoftgraph/msgraph-metadata@f9043275 Generator version: microsoft/kiota@dde63cef * Enable git long paths support for windows hosts * Add format checking stage (disabled) * Try to get an error message from an ODataError
1 parent 77b2f43 commit fa28d63

File tree

9,769 files changed

+391524
-415057
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

9,769 files changed

+391524
-415057
lines changed

.azure-pipelines/release-cli.yaml

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ variables:
3737
value: '$(Build.SourceBranchName)'
3838
- group: ESRP
3939

40-
#
41-
# test -> build -> | sign |
42-
# |------| -> upload
43-
# srcScan -------> | scan |
40+
# test ----------> | build -> | |
41+
# | | sign |
42+
# checkFormat ----------------> |------------| -> upload
43+
# | binaryScan |
44+
# srcScan --------------------> | |
4445
stages:
4546
- stage: test
4647
displayName: Run tests
@@ -113,6 +114,29 @@ stages:
113114
artifact: build-output-$(rid)
114115
path: $(outputDir)-$(rid)
115116

117+
# Format takes a long time. keep it in its own stage
118+
- stage: checkFormat
119+
displayName: Check formatting
120+
condition: false
121+
dependsOn: []
122+
jobs:
123+
- job: checkFormat
124+
displayName: Check formatting
125+
steps:
126+
- task: UseDotNet@2
127+
displayName: 'Use .NET 7'
128+
inputs:
129+
version: 7.x
130+
131+
# Restore NuGet packages (enables cache by default)
132+
- template: templates/nuget-packages.yaml
133+
parameters:
134+
vstsFeedName: ${{variables.internalFeed}}
135+
136+
- pwsh: dotnet format --no-restore --include ./src/ --exclude ./src/generated/ --verify-no-changes
137+
displayName: Validate formatting
138+
enabled: true
139+
116140
- stage: srcScan
117141
displayName: Scan source code
118142
pool:
@@ -226,12 +250,17 @@ stages:
226250
Write-Host "##vso[task.setvariable variable=WORKING_DIR]$(artifactsDownloadLocation)/$(rid)"
227251
displayName: Setup variables
228252
253+
- pwsh: git config --global core.longpaths true
254+
displayName: Enable git's long file paths on Windows
255+
256+
- checkout: self
257+
229258
- task: DownloadPipelineArtifact@2
230259
inputs:
231260
patterns: build-output-$(rid)/**/*
232261
path: $(WORKING_DIR)
233262
condition: and(succeeded(), eq(variables['SHOULD_SIGN'], 'True'))
234-
263+
235264
- pwsh: |
236265
Import-Module $(powershellScriptsDir)/BuildTools.psm1
237266
$zipName = Get-ZipName -FileNameTemplate '$(zipTemplate)' -BranchOrTagName '$(branchOrTagName)' -RuntimeIdentifier '$(rid)'
@@ -316,7 +345,7 @@ stages:
316345

317346
- stage: binaryScan
318347
displayName: Scan binaries (Anti malware, BinSkim)
319-
dependsOn: [build, srcScan]
348+
dependsOn: [build, checkFormat, srcScan]
320349
pool:
321350
vmImage: windows-latest
322351
# Only scan binaries if we're building a tag, building main, or building a PR targeting main
@@ -359,4 +388,3 @@ stages:
359388
$(artifactsDownloadLocation)/build-output-linux-*/*.zip
360389
$(artifactsDownloadLocation)/sign-output-*/*.zip
361390
isPreRelease: $(isPreRelease)
362-

.azure-pipelines/templates/compliance-checks.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ steps:
1616
1717
- ${{ if ne(parameters.scanSource, true) }}:
1818
- checkout: none
19+
- ${{ else }}:
20+
- pwsh: git config --global core.longpaths true
21+
displayName: Enable git's long file paths on Windows
22+
23+
- checkout: self
1924

2025
- ${{ if eq(parameters.scanSource, true) }}:
2126
- task: PoliCheck@2

.editorconfig

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 4
9+
end_of_line = crlf
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
insert_final_newline = true
13+
14+
[*.{y[a]ml,json}]
15+
indent_size = 2
16+
17+
# VSCode generates files with 4 spaces
18+
[.vscode/*.json]
19+
indent_size = 4
20+
21+
# Code files
22+
[*.{cs,csx,vb,vbx}]
23+
indent_size = 4
24+
charset = utf-8-bom
25+
###############################
26+
# .NET Coding Conventions #
27+
###############################
28+
[*.{cs,vb}]
29+
# Organize usings
30+
dotnet_sort_system_directives_first = true
31+
# this. preferences
32+
dotnet_style_qualification_for_field = false:silent
33+
dotnet_style_qualification_for_property = false:silent
34+
dotnet_style_qualification_for_method = false:silent
35+
dotnet_style_qualification_for_event = false:silent
36+
# Language keywords vs BCL types preferences
37+
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
38+
dotnet_style_predefined_type_for_member_access = true:silent
39+
# Parentheses preferences
40+
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
41+
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
42+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
43+
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
44+
# Modifier preferences
45+
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
46+
dotnet_style_readonly_field = true:suggestion
47+
# Expression-level preferences
48+
dotnet_style_object_initializer = true:suggestion
49+
dotnet_style_collection_initializer = true:suggestion
50+
dotnet_style_explicit_tuple_names = true:suggestion
51+
dotnet_style_null_propagation = true:suggestion
52+
dotnet_style_coalesce_expression = true:suggestion
53+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
54+
dotnet_style_prefer_inferred_tuple_names = true:suggestion
55+
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
56+
dotnet_style_prefer_auto_properties = true:silent
57+
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
58+
dotnet_style_prefer_conditional_expression_over_return = true:silent
59+
###############################
60+
# Naming Conventions #
61+
###############################
62+
# Style Definitions
63+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
64+
# Use PascalCase for constant fields
65+
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
66+
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
67+
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
68+
dotnet_naming_symbols.constant_fields.applicable_kinds = field
69+
dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
70+
dotnet_naming_symbols.constant_fields.required_modifiers = const
71+
###############################
72+
# C# Coding Conventions #
73+
###############################
74+
[*.cs]
75+
# var preferences
76+
csharp_style_var_for_built_in_types = true:silent
77+
csharp_style_var_when_type_is_apparent = true:silent
78+
csharp_style_var_elsewhere = true:silent
79+
# Expression-bodied members
80+
csharp_style_expression_bodied_methods = false:silent
81+
csharp_style_expression_bodied_constructors = false:silent
82+
csharp_style_expression_bodied_operators = false:silent
83+
csharp_style_expression_bodied_properties = true:silent
84+
csharp_style_expression_bodied_indexers = true:silent
85+
csharp_style_expression_bodied_accessors = true:silent
86+
# Pattern matching preferences
87+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
88+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
89+
# Null-checking preferences
90+
csharp_style_throw_expression = true:suggestion
91+
csharp_style_conditional_delegate_call = true:suggestion
92+
# Modifier preferences
93+
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
94+
# Expression-level preferences
95+
csharp_prefer_braces = true:silent
96+
csharp_style_deconstructed_variable_declaration = true:suggestion
97+
csharp_prefer_simple_default_expression = true:suggestion
98+
csharp_style_pattern_local_over_anonymous_function = true:suggestion
99+
csharp_style_inlined_variable_declaration = true:suggestion
100+
###############################
101+
# C# Formatting Rules #
102+
###############################
103+
# New line preferences
104+
csharp_new_line_before_open_brace = all
105+
csharp_new_line_before_else = true
106+
csharp_new_line_before_catch = true
107+
csharp_new_line_before_finally = true
108+
csharp_new_line_before_members_in_object_initializers = true
109+
csharp_new_line_before_members_in_anonymous_types = true
110+
csharp_new_line_between_query_expression_clauses = true
111+
# Indentation preferences
112+
csharp_indent_case_contents = true
113+
csharp_indent_switch_labels = true
114+
csharp_indent_labels = flush_left
115+
# Space preferences
116+
csharp_space_after_cast = false
117+
csharp_space_after_keywords_in_control_flow_statements = true
118+
csharp_space_between_method_call_parameter_list_parentheses = false
119+
csharp_space_between_method_declaration_parameter_list_parentheses = false
120+
csharp_space_between_parentheses = false
121+
csharp_space_before_colon_in_inheritance_clause = true
122+
csharp_space_after_colon_in_inheritance_clause = true
123+
csharp_space_around_binary_operators = before_and_after
124+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
125+
csharp_space_between_method_call_name_and_opening_parenthesis = false
126+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
127+
# Wrapping preferences
128+
csharp_preserve_single_line_statements = true
129+
csharp_preserve_single_line_blocks = false

.gitattributes

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Set the default behavior, in case people don't have core.autocrlf set.
2+
* text=auto
3+
4+
# Explicitly declare text files you want to always be normalized and converted
5+
# to native line endings on checkout.
6+
*.json text
7+
*.ps[m]1 text
8+
9+
# Declare files that will always have CRLF line endings on checkout.
10+
*.sh text eol=lf
11+
*.plist text eol=lf
12+
13+
# Declare files that will always have CRLF line endings on checkout.
14+
*.sln text eol=crlf
15+
*.cs text eol=crlf
16+
*.csproj text eol=crlf
17+
18+
# Denote all files that are truly binary and should not be modified.
19+
*.png binary
20+
*.jpg binary

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"omnisharp.organizeImportsOnFormat": true
3+
}

omnisharp.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"FormattingOptions": {
3+
"EnableEditorConfigSupport": true
4+
}
5+
}

0 commit comments

Comments
 (0)