Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .codeclimate.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .qlty/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*
!configs
!configs/**
!hooks
!hooks/**
!qlty.toml
!.gitignore
21 changes: 21 additions & 0 deletions .qlty/configs/.yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
extends: default

rules:
document-start: disable
quoted-strings:
required: only-when-needed
extra-allowed: ["{|}"]
key-duplicates: {}
octal-values:
forbid-implicit-octal: true
line-length: disable
indentation: disable
new-line-at-end-of-file: disable
trailing-spaces: disable
brackets: disable
colons: disable
empty-lines: disable
comments: disable
braces: disable
comments-indentation: disable
commas: disable
94 changes: 94 additions & 0 deletions .qlty/qlty.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# This file was automatically generated by `qlty init`.
# You can modify it to suit your needs.
# We recommend you to commit this file to your repository.
#
# This configuration is used by both Qlty CLI and Qlty Cloud.
#
# Qlty CLI -- Code quality toolkit for developers
# Qlty Cloud -- Fully automated Code Health Platform
#
# Try Qlty Cloud: https://qlty.sh
#
# For a guide to configuration, visit https://qlty.sh/d/config
# Or for a full reference, visit https://qlty.sh/d/qlty-toml
config_version = "0"

exclude_patterns = [
"*_min.*",
"*-min.*",
"*.min.*",
"**/.yarn/**",
"**/*.d.ts",
"**/assets/**",
"**/bower_components/**",
"**/build/**",
"**/cache/**",
"**/config/**",
"**/db/**",
"**/deps/**",
"**/dist/**",
"**/extern/**",
"**/external/**",
"**/generated/**",
"**/Godeps/**",
"**/gradlew/**",
"**/mvnw/**",
"**/node_modules/**",
"**/protos/**",
"**/seed/**",
"**/target/**",
"**/templates/**",
"**/testdata/**",
"**/vendor/**", "bin/", "test/",
]

test_patterns = [
"**/test/**",
"**/spec/**",
"**/*.test.*",
"**/*.spec.*",
"**/*_test.*",
"**/*_spec.*",
"**/test_*.*",
"**/spec_*.*",
]

[smells]
mode = "comment"

[smells.boolean_logic]
threshold = 4

[smells.file_complexity]
threshold = 55

[smells.return_statements]
threshold = 4

[smells.nested_control_flow]
threshold = 4

[smells.function_parameters]
threshold = 4

[smells.function_complexity]
threshold = 5

[smells.duplication]
threshold = 22

[[source]]
name = "default"
default = true

[[plugin]]
name = "rubocop"

[[plugin.fetch]]
url = "https://raw.githubusercontent.com/internetee/style-guide/master/.rubocop-ruby-modern.yml"
path = ".rubocop-ruby-modern.yml"

[coverage]
enabled = true
format = "lcov"
path = "coverage/lcov.info"
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ rvm:
cache: bundler
before_install: gem install bundler -v 2.0.2
before_script:
- "curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter"
- "chmod +x ./cc-test-reporter"
- "./cc-test-reporter before-build"
- "curl https://qlty.sh | sh"
- "gem install simplecov simplecov-lcov"
script:
- "COVERAGE=true bundle exec rake test"
after_script:
- "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT"
- "qlty coverage publish coverage/lcov.info --repo internetee/directo"
1 change: 1 addition & 0 deletions directo.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'pry'
spec.add_development_dependency 'rake', '~> 12.3.3'
spec.add_development_dependency 'simplecov', '0.17'
spec.add_development_dependency 'simplecov-lcov', '~> 0.8'
spec.add_development_dependency 'webmock'

spec.required_ruby_version = '>= 2.6'
Expand Down
8 changes: 8 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
if ENV['COVERAGE']
require 'simplecov'
require 'simplecov-lcov'

SimpleCov::Formatter::LcovFormatter.config do |c|
c.report_with_single_file = true
c.single_report_path = 'coverage/lcov.info'
end

SimpleCov.start do
add_filter '/test/'
formatter SimpleCov::Formatter::LcovFormatter
end
end

Expand Down