Skip to content

add new default files extensions#4970

Merged
DMarinhoCodacy merged 2 commits into
masterfrom
add-default-extensions
May 7, 2026
Merged

add new default files extensions#4970
DMarinhoCodacy merged 2 commits into
masterfrom
add-default-extensions

Conversation

@DMarinhoCodacy
Copy link
Copy Markdown
Contributor

No description provided.

@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

Copy link
Copy Markdown

@codacy-production codacy-production Bot left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

While this PR expands the default file extensions to include .mjs, .jsm, and .vue, it also removes .json from the list. This removal is not mentioned in the title and constitutes a potentially breaking change for existing users. Additionally, the PR lacks unit tests to verify these modifications and omits several modern extensions like .cjs, .mts, and .cts that are relevant to the languages being addressed.

About this PR

  • No unit tests were included in the PR to verify the modification of the default file list. It is critical to ensure the generator returns the expected list of files.
  • No PR description was provided to explain the reasoning for these changes, particularly the removal of the .json extension.

Test suggestions

  • Verify that generateFilesToAnalyze returns the new extensions (.mjs, .jsm, .vue) when no files are specified in the configuration.
  • Verify that .json files are no longer included in the default list returned by generateFilesToAnalyze.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify that generateFilesToAnalyze returns the new extensions (.mjs, .jsm, .vue) when no files are specified in the configuration.
2. Verify that .json files are no longer included in the default list returned by generateFilesToAnalyze.

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

Comment thread src/configCreator.ts
Comment on lines +35 to +37
"**/*.mjs",
"**/*.jsm",
"**/*.vue",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 HIGH RISK

Suggestion: The removal of '/*.json' from the default file list contradicts the 'add' intent specified in the title and appears to be a regression. Additionally, to fully support modern module resolution in JavaScript and TypeScript projects, consider including '/.cjs', '**/.mts', and '**/*.cts'.

Try running the following prompt in your coding agent:

In src/configCreator.ts, update the defaultFilesToAnalyze array to include **/*.json, **/*.cjs, **/*.mts, and **/*.cts while preserving the other newly added extensions (.mjs, .jsm, .vue).

@DMarinhoCodacy DMarinhoCodacy merged commit a242bde into master May 7, 2026
5 checks passed
@DMarinhoCodacy DMarinhoCodacy deleted the add-default-extensions branch May 7, 2026 14:16
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.

2 participants