Skip to content
16 changes: 0 additions & 16 deletions .codeclimate.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/qlty.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: RuboCop Code Quality

on:
push:
branches: [ main, master, develop ]
pull_request:
branches: [ main, master, develop ]

jobs:
rubocop:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true

- name: Install RuboCop
run: gem install rubocop

- name: Run RuboCop check
run: rubocop --config .rubocop.yml
94 changes: 94 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Local RuboCop configuration based on Internetee style guide
# This matches the exact rules from the Internetee style guide

AllCops:
NewCops: enable
TargetRubyVersion: 3.2
Exclude:
- 'bin/**/*'
- 'vendor/**/*'
- 'node_modules/**/*'
- 'db/schema.rb'
- 'config/initializers/version.rb'

# Style
Style/Alias:
EnforcedStyle: prefer_alias_method

Style/FrozenStringLiteralComment:
Enabled: false

Style/ReturnNil:
Enabled: true

Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma

Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma

Style/Lambda:
Enabled: false

Style/RedundantRegexpEscape:
Enabled: false

Style/KeywordParametersOrder:
Enabled: false

Style/StringLiterals:
EnforcedStyle: single_quotes

# Documentation
Style/Documentation:
Enabled: false

# Layout
Layout/LineLength:
Max: 120

Layout/IndentationWidth:
Width: 2

# Metrics
Metrics/PerceivedComplexity:
Enabled: false

Metrics/CyclomaticComplexity:
Enabled: false

Metrics/AbcSize:
Enabled: false

Metrics/MethodLength:
Max: 20

Metrics/ClassLength:
Max: 150

Metrics/ModuleLength:
Max: 150

Metrics/BlockLength:
Max: 30
Exclude:
- 'spec/**/*'
- 'test/**/*'

# Naming - using new rule name
Naming/MethodParameterName:
AllowedNames:
- x
- y
- ph
- pw
- ip
- id

# Lint
Lint/UnusedMethodArgument:
Enabled: false

# Fix deprecated rule - moved from Style to Lint
Lint/MixedRegexpCaptureTypes:
Enabled: false
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

Loading