samuelpordeus / typo_killer

qu'est que ce 🎶 – Killing typos with style (and Elixir!)
MIT License
39 stars 7 forks source link

typokiller don't work on circular symbolic links #32

Open hugopl opened 4 years ago

hugopl commented 4 years ago
$ ./bin/typokiller run -p /home/hugo/src/tijolo/
Path: "/home/hugo/src/tijolo/"
---
Running...
** (File.Error) could not read file stats "/home/hugo/src/tijolo/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib/malloc_pthread_shim/lib": too many levels of symbolic links
    (elixir 1.10.1) lib/file.ex:403: File.stat!/2
    (typo_killer 0.1.0) lib/typo_killer/files.ex:66: TypoKiller.Files.file_in_size_range?/3
    (typo_killer 0.1.0) lib/typo_killer/files.ex:45: TypoKiller.Files.find_files/2
    (elixir 1.10.1) lib/enum.ex:1396: Enum."-map/2-lists^map/1-0-"/2
    (elixir 1.10.1) lib/enum.ex:1396: Enum."-map/2-lists^map/1-0-"/2
    (typo_killer 0.1.0) lib/typo_killer/files.ex:52: TypoKiller.Files.find_files/2
    (elixir 1.10.1) lib/enum.ex:1396: Enum."-map/2-lists^map/1-0-"/2
    (elixir 1.10.1) lib/enum.ex:1396: Enum."-map/2-lists^map/1-0-"/2

The project directory structure above is like:

.
├── bin
├── data
├── icons
├── lib
│   ├── compiled_license
│   │   ├── lib -> ../../lib
│   │   ├── spec
│   │   └── src
│   │       └── compiled_license
│   ├── fzy
│   │   ├── benchmark
│   │   ├── lib -> ../../lib
│   │   ├── spec
│   │   └── src
│   ├── gobject
│   │   ├── lib -> ../../lib
│   │   ├── samples
│   │   │   ├── gtk_css_styling
│   │   │   └── lib
│   │   │       └── gobject -> ../../src
│   │   ├── script
│   │   └── src
│   │       ├── atk
│   │       ├── gdk
│   │       ├── generated
│   │       │   ├── g_i_repository
│   │       │   └── g_object
│   │       ├── generator
│   │       ├── gio
│   │       ├── g_i_repository
│   │       │   └── info
│   │       ├── g_lib
│   │       ├── g_object
│   │       ├── gtk
│   │       └── notify
│   ├── malloc_pthread_shim
│   │   ├── lib -> ../../lib
│   │   └── src
│   └── version_from_shard
│       ├── lib -> ../../lib
│       ├── spec
│       └── src
├── spec
└── src
    └── ui
github-actions[bot] commented 4 years ago

Thanks for opening your first issue! Feel free to open your first PR to solve it :P

hugopl commented 4 years ago

Thanks to this github-actions bot, now I feel like calling to my internet provider to report an issue.... at least it didn't ask my CPF. :disappointed: