C#-SourceFileNaming

Name a source_file for a type defined in it

Required inputs: CSharpAST

Possible Messages

Key

Text

Severity

Disabled

source_file_name_not_type

The file should be named as a type it declares.

None

False

Options

junk_characters

junk_characters : str = ' _-.:'

Characters that should not be considered in the filename to type similarity.
 

named_node_types

named_node_types : set[str] = {'MemberDeclarationSyntax'}

Physical IR node types to inspect for logical names to compare against the file name
 

similarity_threshold

similarity_threshold : float = 0.9

Ratio of how similar the names need to be.