Skip to content

Commit 487fbd8

Browse files
committed
Dependency
1 parent 0cf9142 commit 487fbd8

File tree

2 files changed

+80
-9
lines changed

2 files changed

+80
-9
lines changed

.editorconfig

Lines changed: 78 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,94 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
# Based on: https://github.com/dotnet/roslyn/blob/master/.editorconfig
3+
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
4+
# https://www.jetbrains.com/help/rider/Using_EditorConfig.html?Wave=183
5+
6+
root = true
7+
18
[*]
29
charset = utf-8
310
end_of_line = lf
411
indent_style = space
512
max_line_length = 180
613
insert_final_newline = true
714

8-
[*.cs]
9-
indent_size = 4
10-
# code style settings:
11-
dotnet_sort_system_directives_first = true
12-
13-
[*.csproj]
15+
# XML
16+
[{*.csproj, *.props, .ruleset}]
1417
indent_size = 2
1518

16-
[{*.yml,*.yaml}]
19+
[{*.yml, *.yaml}]
1720
indent_size = 2
1821

1922
[*.json]
2023
indent_size = 2
2124

2225
[{*.sh, *.ps1}]
2326
indent_size = 2
27+
28+
[*.cs]
29+
indent_size = 4
30+
31+
## Dotnet code style settings:
32+
33+
# Sort using and Import directives with System.* appearing first
34+
dotnet_sort_system_directives_first = true
35+
# Avoid "this." and "Me." if not necessary
36+
dotnet_style_qualification_for_field = false:suggestion
37+
dotnet_style_qualification_for_property = false:suggestion
38+
dotnet_style_qualification_for_method = false:suggestion
39+
dotnet_style_qualification_for_event = false:suggestion
40+
41+
# Use language keywords instead of framework type names for type references
42+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
43+
dotnet_style_predefined_type_for_member_access = true:suggestion
44+
45+
# Suggest more modern language features when available
46+
dotnet_style_object_initializer = true:suggestion
47+
dotnet_style_collection_initializer = true:suggestion
48+
dotnet_style_coalesce_expression = true:suggestion
49+
dotnet_style_null_propagation = true:suggestion
50+
dotnet_style_explicit_tuple_names = true:suggestion
51+
52+
# CSharp code style settings:
53+
54+
# Prefer "var" everywhere
55+
csharp_style_var_for_built_in_types = false:none
56+
csharp_style_var_when_type_is_apparent = true:suggestion
57+
csharp_style_var_elsewhere = true:suggestion
58+
59+
# Prefer method-like constructs to have a block body
60+
csharp_style_expression_bodied_methods = false:none
61+
csharp_style_expression_bodied_constructors = false:none
62+
csharp_style_expression_bodied_operators = false:none
63+
64+
# Prefer property-like constructs to have an expression-body
65+
csharp_style_expression_bodied_properties = true:none
66+
csharp_style_expression_bodied_indexers = true:none
67+
csharp_style_expression_bodied_accessors = true:none
68+
69+
# Suggest more modern language features when available
70+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
71+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
72+
csharp_style_inlined_variable_declaration = true:suggestion
73+
csharp_style_throw_expression = true:suggestion
74+
csharp_style_conditional_delegate_call = true:suggestion
75+
76+
# Newline settings
77+
csharp_new_line_before_else = true
78+
csharp_new_line_before_catch = true
79+
csharp_new_line_before_finally = true
80+
csharp_new_line_before_members_in_object_initializers = true
81+
csharp_new_line_before_members_in_anonymous_types = true
82+
83+
## Naming
84+
85+
dotnet_naming_style.underscore_prefix.capitalization = camel_case
86+
dotnet_naming_style.underscore_prefix.required_prefix = _
87+
88+
# private fields should be _camelCase
89+
dotnet_naming_rule.private_fields_with_underscore.symbols = private_fields
90+
dotnet_naming_rule.private_fields_with_underscore.style = underscore_prefix
91+
dotnet_naming_rule.private_fields_with_underscore.severity = suggestion
92+
93+
dotnet_naming_symbols.private_fields.applicable_kinds = field
94+
dotnet_naming_symbols.private_fields.applicable_accessibilities = private

src/Prometheus.Client.MetricServer/Prometheus.Client.MetricServer.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
<PackageTags>prometheus;metrics</PackageTags>
1313
<PackageIconUrl>https://image.ibb.co/k4Sc0k/prometheus.png</PackageIconUrl>
1414
<PackageProjectUrl>https://github.com/PrometheusClientNet/Prometheus.Client.MetricServer</PackageProjectUrl>
15-
<PackageLicenseUrl>https://opensource.org/licenses/MIT</PackageLicenseUrl>
15+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1616
<RepositoryType>git</RepositoryType>
1717
<RepositoryUrl>https://github.com/PrometheusClientNet/Prometheus.Client.MetricServer</RepositoryUrl>
1818
<PackageReleaseNotes>https://github.com/PrometheusClientNet/Prometheus.Client.MetricServer/releases</PackageReleaseNotes>
1919
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
2020
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2121
</PropertyGroup>
2222
<ItemGroup>
23-
<PackageReference Include="Prometheus.Client" Version="2.0.0" />
23+
<PackageReference Include="Prometheus.Client" Version="[2.0.0,3.0.0)" />
2424
</ItemGroup>
2525
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
2626
<Reference Include="System" />

0 commit comments

Comments
 (0)