SublimeLinter / SublimeLinter-rubocop

SublimeLinter 3 plugin for Ruby, using rubocop.
MIT License
159 stars 40 forks source link

--stdin breaking file linting when using docker/podman #79

Closed zedtux closed 1 year ago

zedtux commented 1 year ago

I am running Rubocop in a podman container using the following Bash script:

#!/usr/bin/env bash

podman run --rm \
           --volume "$PWD:/$PWD" \
           docker.io/kalashnikovisme/docker-rubocop:ruby-3.0.4 \
           $@

SublimeLinter-rubocop is sending the following arguments:

--format emacs --display-cop-names --force-exclusion --stdin /path/to/my/current/source_file.rb

Sublime Text 4 (latest version) is always showing me the Lint/EmptyFile cop at line 1. Removing the --stdin flag solves the issue.

I guess, without Docker/Podman the full stdin is passed to rubocop and it works.

Is there a way with Docker / Podman to get the full stdin passed to the container's command? Or could we consider adding an option to the settings so that this linter configures differently the flags passed to rubocop?

kaste commented 1 year ago

https://github.com/containers/podman/issues/3880 They suggest to add -i to the podman command.