Skip to content

Lintrunner fails listing files with non-Latin filenames #101

@scotts

Description

@scotts

We use lintrunner in pytorch/kineto repo. When we try to run with --all-files, we get the error:

$ lintrunner --take CLANGFORMAT,NEWLINE,SPACES,TABS --all-files              
error:        No such file or directory (os error 2) 

The reason is that through submodules, we transitively include filenames with non-Latin characters: https://github.com/civetweb/civetweb/tree/d7ba35bbb649209c66e582d5a0244ba988a15159/test/nonlatin.

The problem is happening when lintrunner issues git grep -Il, and git outputs the paths with octal-escaped characters. This happens in get_all_files().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions