Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Biome issues warnings on certain files produced by supervise #2311

Closed
1 task done
MCFX2 opened this issue Apr 4, 2024 · 6 comments · Fixed by #2392
Closed
1 task done

🐛 Biome issues warnings on certain files produced by supervise #2311

MCFX2 opened this issue Apr 4, 2024 · 6 comments · Fixed by #2392
Assignees
Labels
A-CLI Area: CLI S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@MCFX2
Copy link

MCFX2 commented Apr 4, 2024

Environment information

CLI:
  Version:                      1.6.4
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.12.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "yarn/4.1.1"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

What happened?

  1. Run supervise . at the root of a Node project, and optionally kill it afterwards with ctrl+C
  2. Note that this utility creates a supervise folder with some files, such as supervise/control and supervise/ok
  3. Make sure that supervise/* is added to linter ignore list (I tried a few variations, supervise/** supervise/**/* supervise/*.* with same result)
  4. Run biome lint .
  5. below message is reported on files in the supervise folder
./supervise/ok internalError/fs ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ⚠ Unknown file type

  ℹ Biome encountered a file system entry that's neither a file, directory or symbolic link

Expected result

There should be no output on these files, especially since they match a pattern in the ignore list.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@MCFX2
Copy link
Author

MCFX2 commented Apr 4, 2024

Related: Documentation on the supervise utility.

@ematipico ematipico added A-CLI Area: CLI S-Bug-confirmed Status: report has been confirmed as a valid bug labels Apr 5, 2024
@arendjr
Copy link
Contributor

arendjr commented Apr 5, 2024

Does it help if you put the supervise directory itself in the ignore list? Or **/supervise? I agree your solution should also work, but this may be a workaround.

@MCFX2
Copy link
Author

MCFX2 commented Apr 5, 2024

Does it help if you put the supervise directory itself in the ignore list? Or **/supervise? I agree your solution should also work, but this may be a workaround.

"supervise/", "**/supervise", "supervise", "**/supervise/", "./supervise", and "./supervise/" all produce the same results.

@MCFX2
Copy link
Author

MCFX2 commented Apr 5, 2024

After some local investigation, the files it's tripping up on are named pipes created with something like mkfifo, which Biome doesn't seem too fond of.

So the issues at stake here are:

  • Biome probably shouldn't consider a named pipe an "unknown file type", and should ignore all named pipes.
  • Biome should not be traversing directories that are matched by an ignore pattern.
  • (Opinion) Biome encountering an unknown file type should not issue a warning.

@MCFX2
Copy link
Author

MCFX2 commented Apr 5, 2024

Looks like Biome also fails in the same way on sockets (which similarly can appear in the filesystem on Linux systems).

@Sec-ant
Copy link
Member

Sec-ant commented Apr 7, 2024

Just for reference, rust has unix-specific extensions for the fs module that is able to detect fifo and socket files: https://doc.rust-lang.org/std/os/unix/fs/trait.FileTypeExt.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CLI Area: CLI S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants