Sha256: 24ce5c418e45c31b6ef841ec6d942b21437ad8c8cba0d786432674aca06ab21f
Contents?: true
Size: 1.96 KB
Versions: 1
Compression:
Stored size: 1.96 KB
Contents
Feature: Report smells using simple JSON layout In order to parse Reek's output simply and consistently, simply output a list of smells in JSON. Scenario: output is empty when there are no smells Given a directory called 'clean' containing two clean files When I run reek --format json clean Then it succeeds And it reports this JSON: """ [] """ Scenario: Indicate smells and print them as JSON when using files Given the smelly file 'smelly.rb' When I run reek --format json smelly.rb Then the exit status indicates smells And it reports this JSON: """ [ { "smell_type": "UncommunicativeMethodName", "source": "smelly.rb", "context": "Smelly#x", "lines": [ 4 ], "message": "has the name 'x'", "documentation_link": "https://github.com/troessner/reek/blob/v6.0.2/docs/Uncommunicative-Method-Name.md", "name": "x" }, { "smell_type": "UncommunicativeVariableName", "source": "smelly.rb", "context": "Smelly#x", "lines": [ 5 ], "message": "has the variable name 'y'", "documentation_link": "https://github.com/troessner/reek/blob/v6.0.2/docs/Uncommunicative-Variable-Name.md", "name": "y" } ] """ Scenario: Indicate smells and print them as JSON when using STDIN When I pass "class Turn; end" to reek --format json Then the exit status indicates smells And it reports this JSON: """ [ { "smell_type": "IrresponsibleModule", "source": "STDIN", "context": "Turn", "lines": [ 1 ], "message": "has no descriptive comment", "documentation_link": "https://github.com/troessner/reek/blob/v6.0.2/docs/Irresponsible-Module.md" } ] """
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
reek-6.0.2 | features/reports/json.feature |