Skip to content

Makefile: rubocop --check is not a valid flag (breaks _format) #43

Description

@matthew-on-git

Problem

The reference Makefile's `_format` target invokes:

```make
$(call RUBY_EXEC_FOR,rubocop)rubocop --check --fail-level error $$ruby_paths
```

But rubocop has no `--check` flag. Result:

```
invalid option: --check
For usage information, use --help
{"target":"format","status":"fail","duration_ms":1207,"languages":["ruby"],"failed":["ruby"]}
```

`make _format` fails on every Rails project that has rubocop in its Gemfile.

Fix

Default rubocop behavior is already "report, don't autocorrect" — `--check` is unnecessary. `--fail-level error` already gates exit code on errors. Just remove `--check`:

```make
$(call RUBY_EXEC_FOR,rubocop)rubocop --fail-level error $$ruby_paths
```

Filed from a downstream tipsyhive Makefile sync to v1.11.0. Project-side patch applied at sync.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions