-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Adds ruffix to the default channel. #8824
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automated testing result: ERROR
Repo link: Ruffix
Results help
Packages added:
- Ruffix
Processing package "Ruffix"
- ERROR: Unhandled exception in 'check' routine
- Exception: Expecting value: line 7 column 1 (char 6)
- ERROR: Invalid JSON (with comments)
- File: Default.sublime-keymap
- Exception: Expecting value: line 7 column 1 (char 6)
Thanks for your submission. It seems some JSON files need some work. From a quick look at your code it looks like Ruff runs on files on disk. Files in Sublime Editor are just a projection and might be out of sync with the file on disk. Running this command would potentially update a file that's "dirty", resulting in a conflict (the user will receive message that the file on disk has changed, asking them to reload the file). So you need to resolve that somehow. The way I use tools like this personally, I that I don't make a command, I make a build system, simply with a json file. You can set build systems to save the file before running. And in many cases you can even set it to catch and display (inline in the code) any errors that the tool might return. Unless you want to do more than simply running a file through that utility, build systems are a simpler way of wrapping a utility like this and at the same time also more powerful. You can also set up key bindings to trigger your specific build system. |
Thanks for the feedback @braver - that makes perfect sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automated testing result: ERROR
Repo link: Ruffix
Results help
Packages added:
- Ruffix
Processing package "Ruffix"
- ERROR: Invalid JSON (with comments)
- File: Default.sublime-keymap
- Exception: Expecting value: line 7 column 1 (char 6)
- ERROR: Unhandled exception in 'check' routine
- Exception: Expecting value: line 7 column 1 (char 6)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automated testing result: ERROR
Repo link: Ruffix
Results help
Packages added:
- Ruffix
Processing package "Ruffix"
- ERROR: Unhandled exception in 'check' routine
- Exception: Expecting value: line 7 column 1 (char 6)
- ERROR: Invalid JSON (with comments)
- File: Default.sublime-keymap
- Exception: Expecting value: line 7 column 1 (char 6)
I finally got around to doing this as a custom build as suggested and you're very much correct, it is much more appropriate. Thanks for the tip, I'll close this now. |
There is also LSP-ruff |
My package is ...
A simple interface to
ruff --fix
for automatically fixing issues in Python files.There are no packages like it in Package Control.