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

chore(deps-dev): update rubocop to ~> 1.54.1 in multiple gems #555

Conversation

robbkidd
Copy link
Member

@robbkidd robbkidd commented Jul 11, 2023

Consolidating #549, #550, #551, #552, #553, and all the subsequent PRs dependabot would open to update Rubocop in the rest of the gems were those 5 merged individually.

Update gemspecs

When dependabot is piecemealing a monorepo of gems, go Old School:

git ls-files \*.gemspec \
  | xargs \
    sed -i '' \
        -E "s/'rubocop', '~> [[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+'/'rubocop', '~> 1.54.1'/"

New Cop Complaint

Example:

Offenses:

lib/opentelemetry-propagator-ottrace.rb:8:19: C: [Correctable] Style/RedundantCurrentDirectoryInPath:
  Remove the redundant current directory path.

require_relative './opentelemetry/propagator/ottrace'
                  ^^

OK.

Appeasement

git ls-files \*.gemspec \
  | xargs dirname \
  | while read gem_root; do \
      (cd $gem_root && bundle install && bundle exec rubocop -A); \
    done

When dependabot is piecemealing a monorepo of gems, go Old School:

    git ls-files \*.gemspec \
      | xargs \
        sed -i '' \
            -E "s/'rubocop', '~> [[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+'/'rubocop', '~> 1.54.1'/"
@robbkidd
Copy link
Member Author

robbkidd commented Jul 11, 2023

Offenses:

lib/opentelemetry-propagator-ottrace.rb:8:19: C: [Correctable] Style/RedundantCurrentDirectoryInPath:
  Remove the redundant current directory path.

require_relative './opentelemetry/propagator/ottrace'
                  ^^

But everywhere.

oh no.

… workin' on it.

@robbkidd
Copy link
Member Author

When rubbing bash on a problem leads to more problems, obviously the response to More Bash:

❯ git ls-files \*.gemspec | \
    xargs dirname | \
    while read gem_root; do \
      (cd $gem_root && bundle install && bundle exec rubocop -A); \
    done

I look forward to learning how there is something already in our monorepo that could do this maybe better. Toys?

@robbkidd robbkidd force-pushed the robbkidd.combined-rubocop-1-54-1-bump branch from 44c17c3 to 1d18c2d Compare July 11, 2023 18:31
> Remove the redundant current directory path.
>
> require_relative './opentelemetry/blah/blahblah'
>                   ^^

OK.

    git ls-files \*.gemspec \
      | xargs dirname \
      | while read gem_root; do \
          (cd $gem_root && bundle install && bundle exec rubocop -A); \
        done
@robbkidd robbkidd force-pushed the robbkidd.combined-rubocop-1-54-1-bump branch from 1d18c2d to d941f77 Compare July 11, 2023 18:59
@arielvalentin arielvalentin merged commit b12ea6d into open-telemetry:main Jul 11, 2023
@robbkidd robbkidd self-assigned this Jul 11, 2023
@robbkidd robbkidd added the dependencies Pull requests that update a dependency file label Jul 11, 2023
@robbkidd robbkidd deleted the robbkidd.combined-rubocop-1-54-1-bump branch July 11, 2023 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants