Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Commit 26f7f3e

Browse files
committed
Fix debug handling & README instructions for dump_ast
- We incorrectly looked for `debug` at the root of `config.json`: a pre-release version of the CLI does do this right now, but the stable version should look under the `config` key, which is populated via the `.codeclimate.yml`. - The logger must be at `debug` level for `dump_ast`: updated the README to reflect that.
1 parent fad6ec9 commit 26f7f3e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

‎README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ could also specify `"(hash ___)"` to ignore all hashes altogether.
156156
Figuring out what to filter is tricky. codeclimate-duplication comes
157157
with a configuration option to help with the discovery. Instead of
158158
scanning your code and printing out issues for codeclimate, it prints
159-
out the parse-trees instead! Just add `dump_ast: true` to your
159+
out the parse-trees instead! Just add `dump_ast: true` and `debug: true` to your
160160
.codeclimate.yml file:
161161

162162
```
@@ -166,6 +166,7 @@ engines:
166166
enabled: true
167167
config:
168168
dump_ast: true
169+
debug: true
169170
... rest of config ...
170171
```
171172

‎bin/duplication‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ config =
1313
end
1414

1515
CC.logger.level =
16-
if config["debug"]
16+
if config["debug"] || config.fetch("config",{})["debug"]
1717
::Logger::DEBUG
1818
else
1919
::Logger::INFO

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /