Files
poli0981andClaude Opus 5.5 c8ccabee57 fix: harden parsing and edge cases found by new analyzers
Enables Meziantou.Analyzer and ReferenceTrimmer for every project (CI builds
with -warnaserror) and fixes what they and the new tests found:

- Checksum parsing bounds regex work: 1 s match timeout and over-long lines
  are reported as invalid instead of stalling.
- Release notes from the network are converted with timed-out generated
  regexes; blank lines before lists are no longer swallowed.
- --files-from only deletes the app's own temporary list, never an
  arbitrary file passed on the command line.
- Opening the data folder no longer accepts sibling folders that merely
  share a name prefix.
- Search highlighting uses the same culture-aware match length as the
  filter.
- British English is detected for Australia, New Zealand, Ireland and
  South Africa.
- Separate run/stop buttons per row so the tooltip and screen-reader name
  match the action; JSON/CSV export types are translated.
- Settings saves are serialised under a lock; ConfigureAwait in Core.
- Version 1.2.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:16:40 +07:00

82 lines
3.1 KiB
INI

root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
[*.{json,yml,yaml}]
indent_size = 2
[*.md]
trim_trailing_whitespace = false
# Resource files: values are data, never re-wrap them (IDE formatters used to inject indentation into strings).
[*.resx]
max_line_length = off
ij_xml_keep_line_breaks = true
ij_xml_keep_line_breaks_in_text = true
ij_xml_text_wrap = off
ij_xml_wrap_long_lines = false
[*.{xml,axaml,csproj,props,targets,slnx,manifest,plist}]
indent_size = 4
[*.cs]
# Layout
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_indent_case_contents = true
csharp_indent_switch_labels = true
csharp_space_after_cast = false
csharp_preserve_single_line_statements = true
csharp_preserve_single_line_blocks = true
# Language preferences
csharp_style_namespace_declarations = file_scoped:warning
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion
csharp_style_expression_bodied_methods = when_on_single_line:silent
csharp_style_expression_bodied_properties = true:silent
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_prefer_switch_expression = true:suggestion
csharp_prefer_simple_using_statement = true:suggestion
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_event = false:suggestion
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false
# Naming: private fields are _camelCase, constants are PascalCase
dotnet_naming_rule.private_fields_underscore.symbols = private_fields
dotnet_naming_rule.private_fields_underscore.style = underscore_camel
dotnet_naming_rule.private_fields_underscore.severity = suggestion
dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private
dotnet_naming_style.underscore_camel.capitalization = camel_case
dotnet_naming_style.underscore_camel.required_prefix = _
# Meziantou.Analyzer rules that do not fit this code base.
dotnet_diagnostic.MA0006.severity = none # string == is already ordinal
dotnet_diagnostic.MA0016.severity = none # concrete collection types in signatures are fine here
dotnet_diagnostic.MA0048.severity = none # small related types share a file
dotnet_diagnostic.MA0049.severity = none # HashTool.App.App
dotnet_diagnostic.MA0051.severity = none # method length
# UI code, tests and benchmarks resume on the caller's context; async void is how UI event handlers are written.
[{src/HashTool.App/**.cs,tests/**.cs,bench/**.cs}]
dotnet_diagnostic.MA0004.severity = none
dotnet_diagnostic.MA0147.severity = none
[{tests/**.cs,bench/**.cs}]
dotnet_diagnostic.MA0002.severity = none
dotnet_diagnostic.MA0009.severity = none