Skip to content

fix(ci): add DeepSource config so TS modules are not analyzed as scripts - #111

Merged
DevFlex-AI merged 1 commit into
devfrom
deepsource-config
Jul 31, 2026
Merged

fix(ci): add DeepSource config so TS modules are not analyzed as scripts#111
DevFlex-AI merged 1 commit into
devfrom
deepsource-config

Conversation

@DevFlex-AI

@DevFlex-AI DevFlex-AI commented Jul 31, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #110

Type of change

  • Bug fix

What does this PR do?

The DeepSource JavaScript check fails on every open PR (#101, #103, #107). The repo has no .deepsource.toml, so the analyzer runs with defaults, parses our ESM TypeScript files as scripts, and flags every top-level function declaration as JS-0067 ("function declaration in the global scope"). Any PR touching a TS file "introduces" occurrences and goes red.

This adds a config telling the analyzer what the codebase actually is:

[[analyzers]]
name = "javascript"

  [analyzers.meta]
  environment = ["nodejs"]
  module_system = "es-modules"
  dialect = "typescript"

It also declares test patterns (so test-specific rules relax there), excludes generated SDK output (packages/sdk/js/src/gen, packages/sdk/js/src/v2/gen) and dist, and keeps the docker, shell, and secrets analyzers active.

Note for the reviewer: metric thresholds (e.g. the Documentation Coverage metric DeepSource reports at 4.9%) and per-issue blocking severity are dashboard settings; if runs still fail on metrics after this lands, those need adjusting at app.deepsource.com.

How did you verify your code works?

Config-only change validated against the DeepSource config schema (version 1, analyzer names and meta keys per their docs). The DeepSource run on this PR itself will confirm the JS-0067 flood disappears.

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

View with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is enabled.

Summary by CodeRabbit

  • Chores
    • Added automated code analysis configuration for JavaScript, TypeScript, Docker, shell scripts, and secrets.
    • Configured test and file exclusion patterns to improve analysis accuracy.

@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/adevloper152s-projects?upgradeToPro=build-rate-limit

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3f9f80bc-766e-416c-ba95-0e202cbc665b

📥 Commits

Reviewing files that changed from the base of the PR and between bac45a2 and 410ea95.

📒 Files selected for processing (1)
  • .deepsource.toml

📝 Walkthrough

Walkthrough

Added .deepsource.toml with test patterns, exclusions, and analyzer settings for Node.js ES modules, Docker, shell, and secrets.

Changes

DeepSource configuration

Layer / File(s) Summary
Configure DeepSource analyzers
.deepsource.toml
Defines test paths, excludes generated, dependency, and build paths, and configures JavaScript/TypeScript analysis for Node.js ES modules with Docker, shell, and secrets analyzers.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the DeepSource CI configuration change and its purpose for TypeScript modules.
Description check ✅ Passed The description includes the issue, change type, rationale, verification method, UI note, and completed checklist.
Linked Issues check ✅ Passed The configuration meets issue #110 by setting TypeScript, ES modules, and Node.js options, test patterns, and required exclusions.
Out of Scope Changes check ✅ Passed The changes are limited to the requested DeepSource configuration and retain the specified analyzers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch deepsource-config

Comment @coderabbitai help to get the list of available commands.

@deepsource-io

deepsource-io Bot commented Jul 31, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in bac45a2...410ea95 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript Jul 31, 2026 9:42p.m. Review ↗
Shell Jul 31, 2026 9:42p.m. Review ↗
Secrets Jul 31, 2026 9:42p.m. Review ↗
Docker Jul 31, 2026 9:42p.m. Review ↗
Python Jul 31, 2026 9:42p.m. Review ↗
CSS Jul 31, 2026 9:42p.m. Review ↗
Rust Jul 31, 2026 9:42p.m. Review ↗
Ruby Jul 31, 2026 9:42p.m. Review ↗
Swift Jul 31, 2026 9:42p.m. Review ↗
PHP Jul 31, 2026 9:42p.m. Review ↗
Lua Jul 31, 2026 9:42p.m. Review ↗
Java Jul 31, 2026 9:42p.m. Review ↗
Go Jul 31, 2026 9:42p.m. Review ↗
C & C++ Jul 31, 2026 9:42p.m. Review ↗
Ansible Jul 31, 2026 9:42p.m. Review ↗
Apex Jul 31, 2026 9:42p.m. Review ↗
Elixir Jul 31, 2026 9:42p.m. Review ↗
Groovy Jul 31, 2026 9:42p.m. Review ↗
Objective-C Jul 31, 2026 9:42p.m. Review ↗
PowerShell Jul 31, 2026 9:42p.m. Review ↗
Terraform Jul 31, 2026 9:42p.m. Review ↗
VB.NET Jul 31, 2026 9:42p.m. Review ↗
SQL Jul 31, 2026 9:42p.m. Review ↗
Scala Jul 31, 2026 9:42p.m. Review ↗
Perl Jul 31, 2026 9:42p.m. Review ↗
Kotlin Jul 31, 2026 9:42p.m. Review ↗
Helm Jul 31, 2026 9:42p.m. Review ↗
Erlang Jul 31, 2026 9:42p.m. Review ↗
Dart Jul 31, 2026 9:42p.m. Review ↗
C# Jul 31, 2026 9:42p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@github-actions

Copy link
Copy Markdown

The following comment was made by an LLM, it may be inaccurate:

@DevFlex-AI
DevFlex-AI merged commit f65b9e8 into dev Jul 31, 2026
47 of 48 checks passed
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.

fix(ci): DeepSource JavaScript check fails on every PR (JS-0067 module misdetection)

1 participant