Skip to content

Allow Skunk to generate reports in a given path with the --out flag - #131

Draft
JuanVqz wants to merge 8 commits into
mainfrom
feat/cli-out-path-root
Draft

Allow Skunk to generate reports in a given path with the --out flag#131
JuanVqz wants to merge 8 commits into
mainfrom
feat/cli-out-path-root

Conversation

@JuanVqz

@JuanVqz JuanVqz commented Nov 14, 2025

Copy link
Copy Markdown
Member

Description:

⚠️ Based on #130

This is a breaking change, because the --out flag used to add a filename to save the console report, and now this is accepting the path where reports are going to be saved, (not the file name).

Following RubyCritic conventions, we are setting the root attribute where the reports will be stored; by default it is tmp/rubycritic (we can change it to tmp/skunk as part of this PR).

  • Add an entry to CHANGELOG.md that links to this PR under the "main (unreleased)" heading.

I will abide by the.

@JuanVqz
JuanVqz force-pushed the feat/cli-out-path-root branch from 65f04b5 to 1411dcc Compare November 17, 2025 22:13
Base automatically changed from feat/cli-multi-out-formats to main February 6, 2026 01:12
@JuanVqz
JuanVqz force-pushed the feat/cli-out-path-root branch from 1411dcc to 23da5f1 Compare February 6, 2026 05:27
@JuanVqz

JuanVqz commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

I had forgotten about this PR, I'll try to do my best to get back to it.

Update rubocop todo file with latest offense counts and configurations
…rinting

Move output path configuration to Skunk::Config and remove file output logic from Application#print
Update tests and documentation to reflect changes in output path handling

Even if the default path where the JSON and HTML reports are generated are `tmp/rubycritic` you can now modify them.
- Write reporter output with $stdout.puts directly instead of a private
  print wrapper in the application
- Memoize the SHARE_URL lookups in StatusSharer and use String#empty?
- Simplify Skunk::Config#root= now that to_s covers the nil case
- Assert the default root against an explicit RubyCritic::Config.root
  instead of a path regex, restoring the prior value afterwards
@JuanVqz
JuanVqz force-pushed the feat/cli-out-path-root branch from 23da5f1 to b66b365 Compare September 8, 2026 17:19
RuboCop derives TargetRubyVersion from the gemspec's
required_ruby_version (>= 2.4.0), so a begin/ensure spanning the whole
block body trips Style/RedundantBegin on the RuboCop 1.31/1.50 resolved
for Ruby 2.6 and 2.7, and the block level ensure that would replace it
is 2.6+ syntax that RuboCop 1.81 rejects under the 2.4 parser. Move the
restore into a minitest after hook, which is valid on every supported
Ruby.
Every CI job resolves its own Gemfile.lock, so an unpinned rubocop meant
Ruby 2.7 linted with 1.31, 2.6 with 1.50 and 3.x with 1.81, and a cop
whose behavior changed between them failed the build on the old rubies
only. Pin the version so the matrix lints against one rubocop.

Rubies older than 3.1 cannot install the pin: reek and rubycritic hold
parser below 3.3 there, while rubocop 1.60 and up require it. The
Gemfile leaves rubocop out on those rubies and the Rakefile drops the
lint task when the require fails, so 2.6, 2.7 and 3.0 still run the
tests and reek.

The gemspec listed rubocop as an unpinned development dependency, which
is what drove the resolution, so drop it and let the Gemfile hold the
pin. It stays a Gemfile-only dev tool, like it already was in practice.

Also drop samples/rubycritic/compare/skunk_report.txt, a stray "test
output" file no test reads.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant