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

Adds ruffix to the default channel. #8824

Closed
wants to merge 1 commit into from
Closed

Conversation

drcongo
Copy link

@drcongo drcongo commented Sep 29, 2023

  • I'm the package's author and/or maintainer.
  • I have have read [the docs][1].
  • I have tagged a release with a [semver][2] version number.
  • My package repo has a description and a README describing what it's for and how to use it.
  • My package doesn't add context menu entries. *
  • My package doesn't add key bindings. **
  • Any commands are available via the command palette.
  • Preferences and keybindings (if any) are listed in the menu and the command palette, and open in split view.
  • If my package is a syntax it doesn't also add a color scheme. ***
  • If my package is a syntax it is named after the language it supports (without suffixes like "syntax" or "highlighting").
  • I use [.gitattributes][3] to exclude files from the package: images, test files, sublime-project/workspace.

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.

Copy link
Collaborator

@packagecontrol-bot packagecontrol-bot left a 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)

@braver
Copy link
Collaborator

braver commented Oct 5, 2023

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.

@drcongo
Copy link
Author

drcongo commented Oct 13, 2023

Thanks for the feedback @braver - that makes perfect sense.

Copy link
Collaborator

@packagecontrol-bot packagecontrol-bot left a 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)

@braver braver added the stale The pull request needs to be updated but has not been within the recent past (2 weeks) label Nov 19, 2023
Copy link
Collaborator

@packagecontrol-bot packagecontrol-bot left a 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)

@drcongo
Copy link
Author

drcongo commented Nov 28, 2023

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.

@drcongo drcongo closed this Nov 28, 2023
@rwols
Copy link
Contributor

rwols commented Nov 28, 2023

There is also LSP-ruff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback provided stale The pull request needs to be updated but has not been within the recent past (2 weeks)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants