diff --git a/.editorconfig b/.editorconfig
index 473207c5..477a603e 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -3,12 +3,22 @@ root = true
# All files
[*]
indent_style = space
-dotnet_diagnostic.CA1047.severity = error
# Xml files
[*.xml]
indent_size = 2
+# Xml project files
+[*.{csproj,fsproj,vbproj,proj,slnx}]
+indent_size = 2
+
+# Xml config files
+[*.{props,targets,config,nuspec}]
+indent_size = 2
+
+[*.json]
+indent_size = 2
+
# C# files
[*.cs]
@@ -19,7 +29,6 @@ indent_size = 4
tab_width = 4
# New line preferences
-end_of_line = crlf
insert_final_newline = false
#### .NET Coding Conventions ####
@@ -53,13 +62,16 @@ dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
+dotnet_style_namespace_match_folder = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_object_initializer = true:suggestion
dotnet_style_operator_placement_when_wrapping = beginning_of_line
dotnet_style_prefer_auto_properties = true:suggestion
+dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion
dotnet_style_prefer_compound_assignment = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
-dotnet_style_prefer_conditional_expression_over_return = false:suggestion
+dotnet_style_prefer_conditional_expression_over_return = true:suggestion
+dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
@@ -79,15 +91,15 @@ dotnet_remove_unnecessary_suppression_exclusions = none
[*.cs]
# var preferences
-csharp_style_var_elsewhere = false:silent
+csharp_style_var_elsewhere = false:suggestion
csharp_style_var_for_built_in_types = false:silent
-csharp_style_var_when_type_is_apparent = false:silent
+csharp_style_var_when_type_is_apparent = true:suggestion
# Expression-bodied members
csharp_style_expression_bodied_accessors = true:silent
csharp_style_expression_bodied_constructors = false:silent
csharp_style_expression_bodied_indexers = true:silent
-csharp_style_expression_bodied_lambdas = when_on_single_line:error
+csharp_style_expression_bodied_lambdas = true:suggestion
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_expression_bodied_methods = false:silent
csharp_style_expression_bodied_operators = false:silent
@@ -96,6 +108,7 @@ csharp_style_expression_bodied_properties = true:silent
# Pattern matching preferences
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
+csharp_style_prefer_extended_property_pattern = true:suggestion
csharp_style_prefer_not_pattern = true:suggestion
csharp_style_prefer_pattern_matching = true:silent
csharp_style_prefer_switch_expression = true:suggestion
@@ -104,20 +117,31 @@ csharp_style_prefer_switch_expression = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion
# Modifier preferences
+csharp_prefer_static_anonymous_function = true:suggestion
csharp_prefer_static_local_function = true:warning
-csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent
+csharp_preferred_modifier_order = public,private,protected,internal,file,const,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:suggestion
+csharp_style_prefer_readonly_struct = true:suggestion
+csharp_style_prefer_readonly_struct_member = true:suggestion
# Code-block preferences
csharp_prefer_braces = true:silent
csharp_prefer_simple_using_statement = true:suggestion
+csharp_style_namespace_declarations = file_scoped:suggestion
+csharp_style_prefer_method_group_conversion = true:silent
+csharp_style_prefer_primary_constructors = true:suggestion
+csharp_style_prefer_top_level_statements = true:silent
# Expression-level preferences
csharp_prefer_simple_default_expression = true:suggestion
csharp_style_deconstructed_variable_declaration = true:suggestion
+csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
-csharp_style_pattern_local_over_anonymous_function = true:suggestion
csharp_style_prefer_index_operator = true:suggestion
+csharp_style_prefer_local_over_anonymous_function = true:suggestion
+csharp_style_prefer_null_check_over_type_check = true:suggestion
csharp_style_prefer_range_operator = true:suggestion
+csharp_style_prefer_tuple_swap = true:suggestion
+csharp_style_prefer_utf8_string_literals = true:suggestion
csharp_style_throw_expression = true:suggestion
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
@@ -171,32 +195,21 @@ csharp_space_between_square_brackets = false
# Wrapping preferences
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true
-csharp_style_namespace_declarations = file_scoped:error
-csharp_style_prefer_method_group_conversion = true:silent
-csharp_style_prefer_top_level_statements = true:silent
-csharp_style_prefer_primary_constructors = false:suggestion
-csharp_style_prefer_null_check_over_type_check = true:suggestion
-csharp_style_prefer_local_over_anonymous_function = true:suggestion
-csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
-csharp_style_prefer_tuple_swap = true:suggestion
-csharp_style_prefer_utf8_string_literals = true:suggestion
-csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent
-csharp_style_prefer_readonly_struct = true:suggestion
-csharp_style_prefer_readonly_struct_member = true:suggestion
-dotnet_diagnostic.CA1070.severity = error
-dotnet_diagnostic.CA1032.severity = error
-dotnet_diagnostic.CA1865.severity = error
-dotnet_diagnostic.CA1866.severity = error
-dotnet_diagnostic.CA1867.severity = error
-dotnet_diagnostic.CA2014.severity = error
csharp_prefer_system_threading_lock = true:suggestion
-csharp_style_prefer_unbound_generic_type_in_nameof = true:suggestion
-csharp_style_prefer_implicitly_typed_lambda_expression = true:suggestion
csharp_style_prefer_simple_property_accessors = true:suggestion
+csharp_style_prefer_implicitly_typed_lambda_expression = true:suggestion
+csharp_style_prefer_unbound_generic_type_in_nameof = true:suggestion
csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent
+csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true:silent
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:silent
+dotnet_diagnostic.CA1003.severity = error
+dotnet_diagnostic.CA1008.severity = error
+dotnet_diagnostic.CA1032.severity = error
+dotnet_diagnostic.CA1034.severity = silent
+dotnet_diagnostic.CA1036.severity = error
+dotnet_diagnostic.CA1044.severity = error
#### Naming styles ####
[*.{cs,vb}]
@@ -388,32 +401,17 @@ dotnet_naming_style.s_camelcase.required_prefix = s_
dotnet_naming_style.s_camelcase.required_suffix =
dotnet_naming_style.s_camelcase.word_separator =
dotnet_naming_style.s_camelcase.capitalization = camel_case
-dotnet_style_prefer_collection_expression = when_types_exactly_match:suggestion
-dotnet_style_namespace_match_folder = true:error
tab_width = 4
indent_size = 4
end_of_line = crlf
-dotnet_diagnostic.CA1000.severity = silent
-dotnet_diagnostic.CA1001.severity = warning
-dotnet_diagnostic.CA1002.severity = suggestion
-dotnet_diagnostic.CA1008.severity = error
-dotnet_diagnostic.CA1061.severity = error
-dotnet_diagnostic.CA1063.severity = error
-dotnet_diagnostic.CA2000.severity = error
-dotnet_diagnostic.CA1816.severity = error
-dotnet_diagnostic.CA2213.severity = error
-dotnet_diagnostic.CA2215.severity = error
-dotnet_diagnostic.CA1064.severity = error
-dotnet_diagnostic.CA1069.severity = error
-dotnet_diagnostic.CA1401.severity = error
-dotnet_diagnostic.CA1501.severity = error
-dotnet_diagnostic.CA1700.severity = error
-dotnet_diagnostic.CA1821.severity = error
-dotnet_diagnostic.CA1836.severity = error
-dotnet_diagnostic.CA1843.severity = error
-dotnet_diagnostic.CA1842.severity = error
-dotnet_diagnostic.CA2011.severity = error
dotnet_style_allow_multiple_blank_lines_experimental = true:silent
dotnet_style_allow_statement_immediately_after_block_experimental = true:silent
insert_final_newline = true
+dotnet_diagnostic.CA1001.severity = error
+dotnet_diagnostic.CA1002.severity = silent
+dotnet_diagnostic.CA1005.severity = error
+dotnet_diagnostic.CA1010.severity = error
+dotnet_diagnostic.CA1041.severity = error
+dotnet_diagnostic.CA2025.severity = error
+dotnet_diagnostic.CA2213.severity = error
diff --git a/BookGen.slnx b/BookGen.slnx
index f5b834a6..e45768c8 100644
--- a/BookGen.slnx
+++ b/BookGen.slnx
@@ -13,7 +13,6 @@
-
diff --git a/Commands.md b/Commands.md
index 72748c9f..03855b09 100644
--- a/Commands.md
+++ b/Commands.md
@@ -2,8 +2,7 @@
BookGen - Markdown to Book tool.
-For the tool to work in the work folder there must be a bookgen.json config file. This config file
-can be created with the following command:
+For the tool to work in the work folder there must be a bookgen.json config file. This config file can be created with the following command:
`BookGen Newbook`
@@ -17,500 +16,604 @@ To list available subcommands type:
General arguments:
-`-wd`
-`--wait-debugger`
- Waits for a debugger to be attached. Usefull for error reporting & error finding.
+* `-wd` or `--wait-debugger`
-`-ad`
-`--attach-debugger`
- Attaches a debugger. Usefull for error reporting & error finding.
+ Waits for a debugger to be attached. Usefull for error reporting & error finding.
-`-js`
-`--json-log`
- Outputs log in JSON format. Usefull for interop purposes.
+* `-ad` or `--attach-debugger`
+
+ Attaches a debugger. Usefull for error reporting & error finding.
+
+* `-js` or `--json-log`
+
+ Outputs log in JSON format. Usefull for interop purposes.
# Addfrontmatter
Add a basic YAML frontmatter information to all markdown files located in the current folder
and it's subfolders.
-`BookGen Addfrontmatter [-v] [-d [directory]]`
-`BookGen Addfrontmatter [--verbose] [--dir [directory]]`
+```
+BookGen Addfrontmatter [-v] [-d [directory]]
+BookGen Addfrontmatter [--verbose] [--dir [directory]]
+```
Arguments:
--d, --dir:
- Optional argument. Specifies work directory. If not specified, then
- the current directory will be used as working directory.
+* `-d`, `--dir`:
+
+ Optional argument. Specifies work directory. If not specified, then the current directory will be used as working directory.
+
+* `-v`, `--verbose`:
--v, --verbose:
- Optional argument, turns on detailed logging. Usefull for locating issues
+ Optional argument, turns on detailed logging. Usefull for locating issues
# Assembly-document
Generates a markdown file(s) from a given .NET assembly and it's XML documentation file.
-`BookGen Assembly-document -i -o