From 7f32df63ef7d1ed3c65e898f19a3f7da3f3e823b Mon Sep 17 00:00:00 2001 From: Blazej Sewera Date: Fri, 13 Nov 2020 09:19:43 +0100 Subject: [PATCH 1/4] #20 Bump dotnet-hooks version --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9d32220..61395e7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/jazzsewera/pre-commit-dotnet-hooks.git - rev: v0.3.0 + rev: v0.4.0 hooks: - id: dotnet-reformat name: dotnet-reformat-cc From e5b4e6f9e1649d4ac1d8312b713b9bcd696371fa Mon Sep 17 00:00:00 2001 From: Blazej Sewera Date: Tue, 17 Nov 2020 16:27:44 +0100 Subject: [PATCH 2/4] #20 Update editorconfig --- .editorconfig | 115 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 92 insertions(+), 23 deletions(-) diff --git a/.editorconfig b/.editorconfig index a5accc2..f1f30e9 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,23 +1,92 @@ -# EditorConfig is awesome: https://EditorConfig.org - -# top-most EditorConfig file -root = true - -# Unix-style newlines with a newline ending every file -[*] -end_of_line = lf -insert_final_newline = true - -# Matches multiple files with brace expansion notation -# Set default charset -[*.{py,yml,yaml,md,cs}] -charset = utf-8 - -# 4 space indentation -[*.{py,cs}] -indent_style = space -indent_size = 4 - -[*.{yml,yaml}] -indent_style = space -indent_size = 2 +root=true + +[*] +end_of_line=lf +insert_final_newline=true +charset=utf-8 +indent_style=space +indent_size=4 + +# Microsoft .NET properties +csharp_new_line_before_members_in_object_initializers=false +csharp_preferred_modifier_order=public, private, protected, internal, new, abstract, virtual, sealed, override, static, readonly, extern, unsafe, volatile, async:suggestion +csharp_style_var_elsewhere=false:suggestion +csharp_style_var_for_built_in_types=false:suggestion +csharp_style_var_when_type_is_apparent=false:suggestion +dotnet_naming_rule.constants_rule.severity=warning +dotnet_naming_rule.constants_rule.style=upper_camel_case_style +dotnet_naming_rule.constants_rule.symbols=constants_symbols +dotnet_naming_rule.private_constants_rule.severity=warning +dotnet_naming_rule.private_constants_rule.style=upper_camel_case_style +dotnet_naming_rule.private_constants_rule.symbols=private_constants_symbols +dotnet_naming_rule.private_static_readonly_rule.severity=warning +dotnet_naming_rule.private_static_readonly_rule.style=all_upper_style +dotnet_naming_rule.private_static_readonly_rule.symbols=private_static_readonly_symbols +dotnet_naming_rule.static_readonly_rule.severity=warning +dotnet_naming_rule.static_readonly_rule.style=all_upper_style +dotnet_naming_rule.static_readonly_rule.symbols=static_readonly_symbols +dotnet_naming_style.all_upper_style.capitalization=all_upper +dotnet_naming_style.all_upper_style.word_separator=_ +dotnet_naming_style.upper_camel_case_style.capitalization=pascal_case +dotnet_naming_symbols.constants_symbols.applicable_accessibilities=public,internal,protected,protected_internal,private_protected +dotnet_naming_symbols.constants_symbols.applicable_kinds=field +dotnet_naming_symbols.constants_symbols.required_modifiers=const +dotnet_naming_symbols.private_constants_symbols.applicable_accessibilities=private +dotnet_naming_symbols.private_constants_symbols.applicable_kinds=field +dotnet_naming_symbols.private_constants_symbols.required_modifiers=const +dotnet_naming_symbols.private_static_readonly_symbols.applicable_accessibilities=private +dotnet_naming_symbols.private_static_readonly_symbols.applicable_kinds=field +dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers=static,readonly +dotnet_naming_symbols.static_readonly_symbols.applicable_accessibilities=public,internal,protected,protected_internal,private_protected +dotnet_naming_symbols.static_readonly_symbols.applicable_kinds=field +dotnet_naming_symbols.static_readonly_symbols.required_modifiers=static,readonly +dotnet_style_parentheses_in_arithmetic_binary_operators=never_if_unnecessary:none +dotnet_style_parentheses_in_other_binary_operators=never_if_unnecessary:none +dotnet_style_parentheses_in_relational_binary_operators=never_if_unnecessary:none +dotnet_style_predefined_type_for_locals_parameters_members=true:suggestion +dotnet_style_predefined_type_for_member_access=true:suggestion +dotnet_style_qualification_for_event=false:suggestion +dotnet_style_qualification_for_field=false:suggestion +dotnet_style_qualification_for_method=false:suggestion +dotnet_style_qualification_for_property=false:suggestion +dotnet_style_require_accessibility_modifiers=for_non_interface_members:suggestion + +# ReSharper properties +resharper_align_multiline_parameter=true +resharper_autodetect_indent_settings=true +resharper_enforce_line_ending_style=true +resharper_use_indent_from_vs=false + +# ReSharper inspection severities +resharper_arrange_redundant_parentheses_highlighting=hint +resharper_arrange_this_qualifier_highlighting=hint +resharper_arrange_type_member_modifiers_highlighting=hint +resharper_arrange_type_modifiers_highlighting=hint +resharper_built_in_type_reference_style_for_member_access_highlighting=hint +resharper_built_in_type_reference_style_highlighting=hint +resharper_redundant_base_qualifier_highlighting=warning +resharper_suggest_var_or_type_built_in_types_highlighting=hint +resharper_suggest_var_or_type_elsewhere_highlighting=hint +resharper_suggest_var_or_type_simple_types_highlighting=hint +resharper_web_config_module_not_resolved_highlighting=warning +resharper_web_config_type_not_resolved_highlighting=warning +resharper_web_config_wrong_module_highlighting=warning + +# Matches multiple files with brace expansion notation +# Set default charset +[*.{py,yml,yaml,md,cs}] +charset=utf-8 + +# 4 space indentation +[*.{py,cs}] +indent_style=space +indent_size=4 + +[*.{yml,yaml}] +indent_style=space +indent_size=2 + +[*.{appxmanifest,asax,ascx,aspx,build,cg,cginc,compute,cs,cshtml,dtd,fs,fsi,fsscript,fsx,hlsl,hlsli,hlslinc,master,ml,mli,nuspec,razor,resw,resx,shader,skin,usf,ush,vb,xaml,xamlx,xoml,xsd}] +indent_style=space +indent_size=4 +tab_width=4 From 8205c61aa55ba9d54fb4ed58be05a826c997b417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Sewera?= Date: Wed, 18 Nov 2020 01:56:13 +0100 Subject: [PATCH 3/4] #20 Add first version of mpls packet spec --- docs/stages/mpls_packet_spec.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 docs/stages/mpls_packet_spec.md diff --git a/docs/stages/mpls_packet_spec.md b/docs/stages/mpls_packet_spec.md new file mode 100644 index 0000000..4e35eca --- /dev/null +++ b/docs/stages/mpls_packet_spec.md @@ -0,0 +1,7 @@ +# MPLS Packet + +## Structure + +``` +[src_port_alias, dest_port_alias, [label_list], message] +``` From 751a1b68acbda69a9ea1a8599480f17bbfd0cb65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Sewera?= Date: Wed, 18 Nov 2020 01:57:44 +0100 Subject: [PATCH 4/4] #20 Remove useless pre-commit hook --- .pre-commit-config.yaml | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 61395e7..5c4b24d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,23 +1,4 @@ repos: -- repo: https://github.com/jazzsewera/pre-commit-dotnet-hooks.git - rev: v0.4.0 - hooks: - - id: dotnet-reformat - name: dotnet-reformat-cc - files: 'cc/src/.*\.cs' - args: ['cc/cc.csproj'] - - id: dotnet-reformat - name: dotnet-reformat-cn - files: 'cn/src/.*\.cs' - args: ['cn/cn.csproj'] - - id: dotnet-reformat - name: dotnet-reformat-ms - files: 'ms/src/.*\.cs' - args: ['ms/ms.csproj'] - - id: dotnet-reformat - name: dotnet-reformat-nn - files: 'nn/src/.*\.cs' - args: ['nn/nn.csproj'] - repo: https://github.com/jazzsewera/pre-commit-message-check-hook.git rev: v0.2.0 hooks: