Skip to content

Commit 60df184

Browse files
committed
rake qlty task
1 parent 5e05f0e commit 60df184

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.qlty/qlty.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ threshold = 4
7474
[smells.function_complexity]
7575
threshold = 5
7676

77-
[smells.duplication]
78-
threshold = 22
79-
8077
[[source]]
8178
name = "default"
8279
default = true

Rakefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,14 @@ RSpec::Core::RakeTask.new(:spec)
1313
require "rubocop/rake_task"
1414
RuboCop::RakeTask.new(:rubocop) do |t|
1515
# See https://docs.rubocop.org/rubocop/usage/basic_usage.html
16-
t.options = ['--display-cop-names', '--parallel']
16+
t.options = ["--display-cop-names", "--parallel"]
17+
end
18+
19+
desc "Run Qlty code analysis"
20+
task :qlty do
21+
sh "qlty smells --all"
22+
sh "qlty metrics --all --max-depth=2 --sort complexity --limit 10"
23+
# sh "qlty lint" # Just runs rubocop, not necessary as we have a task for this already
1724
end
1825

1926
# default task: Add spec and rubocop to default tasks.

0 commit comments

Comments
 (0)