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

🐛 VCS Ignore File is not always read correctly #139

Closed
1 task done
itsMapleLeaf opened this issue Sep 4, 2023 · 0 comments · Fixed by #150
Closed
1 task done

🐛 VCS Ignore File is not always read correctly #139

itsMapleLeaf opened this issue Sep 4, 2023 · 0 comments · Fixed by #150
Labels
A-Project Area: project S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@itsMapleLeaf
Copy link

Environment information

LI:
  Version:                      1.0.0
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           windows

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         unset
  JS_RUNTIME_VERSION:           "v18.16.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "pnpm/8.7.1"

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

Workspace:
  Open Documents:               0

Discovering running Biome servers...

Incompatible Biome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

i Rage discovered this running server using an incompatible version of Biome.

Server:
  Version:                      <=10.0.0

What happened?

Given the following files:

// biome.json
{
	"$schema": "https://biomejs.dev/schemas/1.0.0/schema.json",
	"organizeImports": {
		"enabled": true
	},
	"linter": {
		"enabled": true,
		"rules": {
			"recommended": true
		}
	},
	"vcs": {
		"enabled": true,
		"clientKind": "git",
		"useIgnoreFile": true
	}
}
// ignore-this/file.ts
debugger;

biome ci . when .gitignore contains ignore-this:

biome-ignore-bug on  main [?] via  v18.16.0 
❯ pnpm biome ci .
Checked 1 file(s) in 2ms

...when .gitignore contains:

  • ignore-this/ (trailing slash)
  • /ignore-this (leading slash)
biome-ignore-bug on  main [?] via  v18.16.0 
❯ pnpm biome ci .
.\ignore-this\file.ts:1:1 lint/suspicious/noDebugger  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  × This is an unexpected use of the debugger statement.

  > 1 │ debugger;
      │ ^^^^^^^^^
    2 │ 

  i Suggested fix: Remove debugger statement

    1 │ debugger;
      │ ---------

.\ignore-this\file.ts lint ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  × The file contains diagnostics that needs to be addressed.


Checked 3 file(s) in 4ms
Found 2 error(s)
ci ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  × Some errors were emitted while running checks.

Expected result

Since the above cases are all ignored by git, I would expect biome not to error.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@ematipico ematipico added A-Project Area: project S-Bug-confirmed Status: report has been confirmed as a valid bug labels Sep 4, 2023
@Conaclos Conaclos added this to the Biome 1.1 milestone Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Project Area: project 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.

3 participants