Skip to content

allow usage of --header-opt-in and --header-opt-out flags #3

@alexdean

Description

@alexdean

rubyfmt supports two flags which are useful when introducing the tool to an existing codebase.

  • rubyfmt --header-opt-in -- files or directories to format files only with a # rubyfmt: true comment at the top of the file
  • rubyfmt --header-opt-out -- files or directories to skip formatting files with a # rubyfmt: false comment at the top of the file

https://github.com/fables-tales/rubyfmt#build-from-source

It would be very useful to be able to use these options via the sublime package. Currently this isn't possible because the "rubyfmt_executable" package setting expects to be only the binary, & does not allow flags.

when i use this config

{
  "rubyfmt_executable": "rubyfmt --header-opt-in",
  "format_on_save": true,
}

i see this error in the sublime console when saving a ruby file:

FileNotFoundError: [Errno 2] No such file or directory: 'rubyfmt --header-opt-in'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions