mastodontech.de ist einer von vielen unabhängigen Mastodon-Servern, mit dem du dich im Fediverse beteiligen kannst.
Offen für alle (über 16) und bereitgestellt von Markus'Blog

Serverstatistik:

1,5 Tsd.
aktive Profile

#rubocop

0 Beiträge0 Beteiligte0 Beiträge heute

You might have noticed a record-breaking 7th consecutive bugfix release for #RuboCop (see github.com/rubocop/rubocop/rel). I just wanted to say that's not because the quality of RuboCop dropped, but because I've decided to focus on bug-fixing and polish for a while.

We have plenty of features already! 😁

GitHubRelease RuboCop v1.75.7 · rubocop/rubocopBug fixes #14185: Fix an error for Style/IfUnlessModifierOfIfUnless when using nested modifier. (@koic) #14192: Fix negatives for Layout/SpaceBeforeBrackets when using space between method argumen...

I added a new configuration option to the `Naming/PredicateName` RuboCop rule: `UseSorbetSigs`. And it’s now released.

If set, it will take into account Sorbet sigs. So it will only complain if the method doesn’t start/end with the right things (like is_, has_, question mark) if there’s a `returns(T::Boolean)` sig.

Setting this option has reduced the number of TODOs for this rule in the `github/github` codebase by over 50%.

I have no idea why I'm getting these rubocop errors. Rubocop seems to think these constants are defined within a `private` section, but they are not. The classes do however include a small `private` section above which is terminated by another `public` keyword, which should not effect the constants below the `public` keyword. I cannot seem to reproduce this rubocop bug in a stand-alone example.
github.com/ronin-rb/ronin-vuln

GitHubUpdated the ChangeLog for 0.2.1. · ronin-rb/ronin-vulns@feaf582Tests URLs for Local File Inclusion (LFI), Remote File Inclusion (RFI), SQL injection (SQLi), and Cross Site Scripting (XSS), Server Side Template Injection (SSTI), and Open Redirects. - Updated ...

Seriously considering launching myself as able to take on #freelance work on #Ruby, #RuboCop, #Sorbet, etc stuff.

There’s something very satisfying about fixing a list of things and making a codebase better in terms of consistency and developer experience. And I know a lot of people don’t enjoy that.

Very part-time. I love my “real” job and everything else I do (OSS, events). After my maths exam would make more sense. But I’m still bored at weekends and the winter electricity bills are 📈😩.

I recently ran into an old codebase (~12 years old) without a Rubocop configuration, and figured adding one to existing code wasn't always as easy as it seems.

Here's a little step-by-step guide I wrote on how to tackle this kind of situation:
dev.to/lcsm0n/adding-a-rubocop

DEV CommunityAdding a Rubocop config to an old repository | step-by-step guideWhile using Rubocop as a linter/formatter is a no-brainer for most Rails developers these days, it...
#ruby#rails#rubocop
Antwortete im Thread

@alexanderadam @cam Ever had untuned #RuboCop turn a simple one-line ternary into a tortured mess of if/then or case statements? I have.

Part of the *art* of coding is elegance without losing clarity. RuboCop's default rulesets consistently uglify my code. When teams don't tune the rules they fall back on argument from authority regarding style sheets because `tuning == work`. Standard and rubocop-rails-omakase reduce the burden and avoid trivialities, which is why I like them!

Antwortete im Thread

@alexanderadam @cam No, but I know lots of teams where EVERYONE basically runs `rubocop --regenerate-todo` before every commit because they don't have the time, interest, or agreement to prevent untuned #RuboCop from uglifying or distorting code. #Standardrb, and to a lesser extent github.com/rails/rubocop-rails, have many fewer argument-inducing rules so people actually *use* the linters & style guides rather than just ignoring them.

IMHO the default RuboCop rules ruin good #RubyLang code. YMMV.

GitHubGitHub - rails/rubocop-rails-omakase: Omakase Ruby styling for RailsOmakase Ruby styling for Rails. Contribute to rails/rubocop-rails-omakase development by creating an account on GitHub.

@mike_k Defaulting to double-quotes is one of the things I love about #standardrb. Actually, the RuboCop Rails Omakase gem is pretty good, too. The only rule in there I hate is the default of enforcing spaces inside square brackets. You can tune that, but then it wants to change a bunch of Rails config files and such, too. Oh, and complaining about trailing commas in Hash and Array literals. Either way, better than the dozens of violations standard #RuboCop emits out of the box!