standardrb / vscode-standard-ruby

The official VS Code extension for the Standard Ruby linter and code formatter
Other
101 stars 7 forks source link

Does not support `ignore` from `.standard.yml` #18

Closed rmehner closed 6 months ago

rmehner commented 7 months ago

Hey :wave:,

first of all: Thanks for this excellent extension. After years of being conditioned by prettier, gofmt and friends it always felt weird to come back to Ruby project without good format on save. This (and the underlying standardrb obviously) increased my dev happiness a lot!

Now onto the issue:

Given the following .standard.yml:

ignore:
  - spec/spec_helper.rb

I'd expect that opening up spec/spec_helper.rb and hitting save shouldn't change anything in that file. However, it does format that file.

Is this a well known limitation?

My philosophy here is to keep generated files like Rails configs, rspec configs and friends in my ignore list, so that the diff on updates is small. Granted, this could also be fixed by a semantic diff tool, but not everyone has one set up.

searls commented 7 months ago

The plugin actually does support the ignore file. Can you confirm that you can reproduce this when the .standard.yml is in the root of the workspace folder and that you don't have any other extensions enabled that might be formatting your files (ideally by disabling everything but Standard)?

rmehner commented 6 months ago

Curiously enough I cannot reproduce this anymore after being forced to reboot thanks to an OS update. Will close this. Thank you for your reply!