Skip to content

Add support for assembly files and make file extensions case insensitive #22

@cetygamer

Description

@cetygamer

Suggested changes:

func isSourceFileName(fileName string) bool {
return strings.HasSuffix(fileName, ".cpp") ||
strings.HasSuffix(fileName, ".cc") ||
strings.HasSuffix(fileName, ".cxx") ||
strings.HasSuffix(fileName, ".c")
}
func isHeaderFileName(fileName string) bool {
return strings.HasSuffix(fileName, ".h") ||
strings.HasSuffix(fileName, ".hh") ||
strings.HasSuffix(fileName, ".hxx") ||
strings.HasSuffix(fileName, ".hpp")
}

->

func isSourceFileName(fileName string) bool {
	return strings.HasSuffix(strings.ToLower(fileName), ".cpp") ||
		strings.HasSuffix(strings.ToLower(fileName), ".cc") ||
		strings.HasSuffix(strings.ToLower(fileName), ".cxx") ||
		strings.HasSuffix(strings.ToLower(fileName), ".c") ||
		strings.HasSuffix(strings.ToLower(fileName), ".s")
}

func isHeaderFileName(fileName string) bool {
	return strings.HasSuffix(strings.ToLower(fileName), ".h") ||
		strings.HasSuffix(strings.ToLower(fileName), ".hh") ||
		strings.HasSuffix(strings.ToLower(fileName), ".hxx") ||
		strings.HasSuffix(strings.ToLower(fileName), ".hpp")
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions