Skip to content

SourceParser should only sort file list on globs #572

@lsegal

Description

@lsegal

When the SourceParser class currently parses a list of files it does so by sorting the list by path length, guaranteeing that "lib/foo.rb" is parsed before "lib/foo/bar.rb" (which might rely on the "parent" file). However, because the parser sorts all files, it is currently not possible to manually override this sorting order. For instance, it should be possible to do the following:

$ yard doc lib/foo/bar.rb lib/**/*.rb

The above should parse "lib/foo/bar.rb" before "lib/foo.rb". This does not currently work. The solution is to only perform sorting on globs, and assume that single files are listed in the exact order which they are presented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions