Skip to content

feat: add support for checkstyle format for scorecard-classic command#2654

Merged
AlbinaBlazhko17 merged 11 commits intomainfrom
feat/add-support-for-checkstyle-format-in-scorecard
Mar 16, 2026
Merged

feat: add support for checkstyle format for scorecard-classic command#2654
AlbinaBlazhko17 merged 11 commits intomainfrom
feat/add-support-for-checkstyle-format-in-scorecard

Conversation

@AlbinaBlazhko17
Copy link
Contributor

@AlbinaBlazhko17 AlbinaBlazhko17 commented Mar 13, 2026

What/Why/How?

Implemented checkstyle format for scorecard-classic command.

Reference

Resolves #2581

Testing

Locally

Screenshots (optional)

Screenshot 2026-03-16 at 09 52 48

Check yourself

  • Code changed? - Tested with Redoc/Realm/Reunite (internal)
  • All new/updated code is covered by tests
  • New package installed? - Tested in different environments (browser/node)
  • Documentation update considered

Security

  • The security impact of the change has been considered
  • Code follows company security practices and guidelines

@changeset-bot
Copy link

changeset-bot bot commented Mar 13, 2026

🦋 Changeset detected

Latest commit: 375815e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@redocly/cli Minor
@redocly/openapi-core Minor
@redocly/respect-core Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@AlbinaBlazhko17 AlbinaBlazhko17 changed the title Feat/add support for checkstyle format in scorecard fest: added support for checkstyle format for scorecard-classic command Mar 13, 2026
@AlbinaBlazhko17 AlbinaBlazhko17 changed the title fest: added support for checkstyle format for scorecard-classic command fest: add support for checkstyle format for scorecard-classic command Mar 13, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 13, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 79.29% (🎯 79%) 6461 / 8148
🔵 Statements 78.75% (🎯 78%) 6680 / 8482
🔵 Functions 82.52% (🎯 82%) 1318 / 1597
🔵 Branches 71.24% (🎯 71%) 4411 / 6191
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/cli/src/commands/scorecard-classic/index.ts 0% 0% 0% 0% 23-137
packages/cli/src/commands/scorecard-classic/formatters/checkstyle-formatter.ts 100% 100% 100% 100%
packages/core/src/format/format.ts 50.8% 41.5% 58.06% 50.56% 25, 67-68, 113, 117-143, 161, 165, 173-191, 200-305, 310, 323-329, 354-360, 367, 412-425, 439-440, 467
Generated in workflow #8994 for commit 375815e by the Vitest Coverage Report Action

@github-actions
Copy link
Contributor

github-actions bot commented Mar 13, 2026

CLI Version Mean Time ± Std Dev (s) Relative Performance (Lower is Faster)
cli-latest 3.531s ± 0.039s ▓ 1.00x (Fastest)
cli-next 3.535s ± 0.019s ▓ 1.00x

@AlbinaBlazhko17 AlbinaBlazhko17 changed the title fest: add support for checkstyle format for scorecard-classic command feat: add support for checkstyle format for scorecard-classic command Mar 13, 2026
@AlbinaBlazhko17 AlbinaBlazhko17 marked this pull request as ready for review March 13, 2026 12:08
@AlbinaBlazhko17 AlbinaBlazhko17 requested review from a team as code owners March 13, 2026 12:08
suggest: [],
location: [
{
source: createMockSource('/api/openapi.yaml') as any,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
source: createMockSource('/api/openapi.yaml') as any,
source: { absoluteRef: '/api/openapi.yaml') } as any,

You can simply use this, I believe. No need for the factory function. (Same in other scorecard tests.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The createMockSource function is used to mock the functions, which are used inside printScorecardResultsAsCheckstyle. If i change it just to absoluteRef i will receive an error: TypeError: source.getAst is not a function.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Makes sense.

@AlbinaBlazhko17 AlbinaBlazhko17 merged commit f557762 into main Mar 16, 2026
43 checks passed
@AlbinaBlazhko17 AlbinaBlazhko17 deleted the feat/add-support-for-checkstyle-format-in-scorecard branch March 16, 2026 09:47
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.

scorecard-classic: Support --format=checkstyle

3 participants