Releases: robotcodedev/robotcode
v2.6.0
Features
-
analyze: Add --code filter to code subcommand (4bfc339)
--coderestricts the result to the given diagnostic codes (e.g.
KeywordNotFound), repeatable and comma-separated, matched
case-insensitively like the modifiers. Unlike-mi "*"+ re-include, it
filters without changing the severity of what remains. It affects the
output, summary and exit code, and combines with --severity using AND. -
analyze: Add --severity filter to code subcommand (f565c16)
--severityrestricts the analysis result to the listed severities
(repeatable and comma-separated; error/warn/info/hint). Filtered-out
severities are dropped from the output, the summary counts and the exit
code alike, so all three stay consistent. It's orthogonal to
--exit-code-mask (which only masks the exit code) and complements the
diagnostic modifiers (which remap rather than filter). -
analyze: Add SARIF, GitHub and GitLab output formats (7103836)
robotcode analyze codegains a local--output-formatflag (overrides
the global--formatfor this command) with these values:concise(default): the human-readable text outputjson/json-indent: structured result (diagnostics + summary)sarif: SARIF 2.1.0 log for GitHub code scanning and other consumersgithub: GitHub Actions workflow annotations (::error file=...)gitlab: GitLab Code Quality report (JSON array)
--output-file FILEwrites the report to a file instead of stdout (for
the json/json-indent/sarif/github/gitlab formats), which is handy for CI
artifact upload. A missing target directory raises a clear UsageError and
other I/O errors surface as a ClickException instead of a traceback.Mapping details shared across the machine formats:
- LSP 0-based ranges become the 1-based positions SARIF/GitHub expect
- severities collapse onto each format's levels (e.g. SARIF error/warning/
note, GitHub error/warning/notice, GitLab major/minor/info) - artifact paths are POSIX and relative to the project root (what the CI
integrations expect);--full-pathsswitches to absolute paths - SARIF and GitLab results carry a stable fingerprint (independent of line
number) so alerts survive unrelated edits - GitHub property/message values are escaped per the @actions/toolkit rules
-
analyze: Add JSON output and --full-paths to code subcommand (fc76cf3)
robotcode --format json analyze code(and--format json_indent) now
emit a structured result instead of falling back to plain text:diagnostics: a map of source path to LSP diagnostics, using the same
shape as thediscover/resultscommands so editor and CI integrations
can reuse their parsers. Workspace-level diagnostics key on ".".summary: file count and per-severity totals.
The JSON always carries the full diagnostic message (tracebacks included);
--show-tracebacksonly affects the text output.New
--full-paths/--no-full-pathsflag (mirroringdiscover) switches
between root-relative and absolute paths in both text and JSON output.
JSON keys are always rendered POSIX-style for cross-platform stability. -
analyze: Polish code subcommand output (1049b79)
- Output is now sorted by (file, line, column) so warnings and errors
appear in source order instead of mixed by analyzer pass. - Severity is rendered as a full word, e.g.
[ERROR]instead of[E],
matching the convention from Robocop, ruff, mypy and friends. - Robot Framework's appended Python tracebacks and PYTHONPATH dumps are
no longer printed by default; the new--show-tracebacksflag opts
back into the full message. - Multi-line diagnostic messages (e.g.
MultipleKeywordslisting the
alternative names) are re-indented with a consistent prefix. - Related-information entries are prefixed with
->to set them apart
visually, and they fall back to(see related location)when Robot
Framework provides no secondary message.
- Output is now sorted by (file, line, column) so warnings and errors
-
cli: Detect GitHub Copilot agent sessions (dbc5603)
Adds two markers to the AI-agent auto-detection so terminal commands
invoked from Copilot get the same clean-output defaults (no color,
no pager, REPL plain backend) as sessions from Claude Code, Cursor,
Codex, and friends:- COPILOT_AGENT — set by VS Code Copilot Chat / agent mode in
terminals launched via run_in_terminal
(microsoft/vscode#311734). - COPILOT_AGENT_SESSION_ID — set on every shell command and MCP
server the standalone GitHub Copilot CLI spawns (>= 0.0.429).
- COPILOT_AGENT — set by VS Code Copilot Chat / agent mode in
-
cli: Adapt automatically to AI agent sessions (8b34a33)
When
robotcodeis invoked from inside an AI agent (Claude Code,
Cursor, Copilot CLI, OpenCode, Codex, Gemini, …) it now drops
coloured output, the pager, and the REPL's interactive prompt
features — so the agent sees clean line-by-line text instead of
ANSI escapes and popup ghosts.Explicit flags and the usual environment variables (
NO_COLOR,
FORCE_COLOR,ROBOTCODE_REPL_PLAIN,ROBOTCODE_REPL_BACKEND)
still override the detection.ROBOTCODE_NO_AI_AGENT=1opts out
when you want the full experience anyway;ROBOTCODE_FORCE_AI_AGENT=1
turns the agent-mode on for local repros. -
cli: Auto-detect when to emit colors, honor NO_COLOR and FORCE_COLOR (4bbf944)
ANSI escape codes no longer leak into piped output, files, log captures or
CI artefacts — colors are auto-disabled when stdout/stderr isn't a TTY.
The NO_COLOR and FORCE_COLOR environment variables are now respected.
stdout and stderr are decided independently, so warnings keep their colour
when stdout is piped but stderr is still on the terminal. Explicit--color
/--no-colorstill override everything. -
discover: Show a diagnostics summary, full list only on demand (4b96656)
robotcode discoverno longer prints Robot's parsing errors and warnings
by default. When a suite has parse issues, a compactDiagnosticssection
with the error/warning counts now appears after the statistics, separate
from the discovery statistics.Pass
--diagnosticsto list the full messages; they are printed before
the discovered results, with file paths shown the same project-relative
way as the rest of the output. The machine-readable JSON output keeps
including the full diagnostics regardless, so editors are unaffected. -
discover:
robotcode discoverTEXT output is now markdown (a7ef8bc)robotcode discoversubcommands now emit markdown for human
output. On a coloured TTY rich renders it to themed ANSI and
pages if needed; in a pipe (or with --no-color) the raw markdown
is emitted verbatim. JSON output is unchanged.- info renders as a field/value table.
- files, suites, tests, tasks emit as bullet lists; tags shows
one bullet per tag with nested tests/tasks when --tests / --tasks
is on. - all keeps the workspace → suites → tests tree as a nested
markdown list, each level indented two spaces. - Statistics blocks are markdown tables.
The generic markdown helpers used by results — md_table,
bold_status, path_paren, display_width, the search highlighter
— move fromresults/_render.pyto a shared
cli/_markdown.pyso both commands import them from one place.Same commit aligns the existing results renderer on the new
label convention: bold is reserved for entities (test/suite
/tag names, status); italic marks labels (Tags, Total,
Extracted, Summary, metadata keys);(path:line)references
are wrapped in inline-code spans so they read as code tokens. -
docs: Add interactive hero image carousel with responsive lightbox (edd6d22)
-
language-server: Use the SemanticModel for the "Create Keyword" and "Assign Result to Variable" code actions (6a3d5a3)
When the experimental SemanticAnalyzer is enabled, the "Create Keyword"
quick fix (offered for unknown keywords) and the "Assign keyword result
to variable" refactor read the keyword call's namespace, library entry
and assignment state from the SemanticModel instead of walking the AST
and re-resolving via ModelHelper. Output unchanged — covered by
dedicated equivalence test files for both code actions. -
language-server: Use the SemanticModel for the "Open Documentation" code action (0768c84)
When the experimental SemanticAnalyzer is enabled, the "Open Documentation"
code action reads the pre-resolved keyword data and SemanticTokens from
the model instead of looking the keyword up again on every request.
Output is unchanged — verified by the existing E2E suite under both paths
and a new equivalence test file. -
language-server: Use the SemanticModel for signature help ([9415e86](https://github.com...
v2.5.1
Bug Fixes
-
analyzer: Do not report embedded arguments as VariableNotFound in template keywords (c34455f)
When a test case uses [Template] or Test Template with a keyword that has
embedded arguments (e.g. "The result of ${calculation} should be ${expected}"),
the embedded argument placeholders were incorrectly analyzed as unresolved
variables, producing false VariableNotFound diagnostics.Skip variable analysis for embedded argument tokens when the keyword call
originates from a template declaration. -
robot: Match longest BDD prefix first for multi-word prefixes (dad536e)
French BDD prefixes like "Étant donné que", "Et que",
"Mais que" were not fully recognized because shorter prefixes (e.g.
"Et") matched before longer ones (e.g. "Et que").Replaced manual iteration and set lookups with a regex-based approach
matching Robot Framework's own strategy: prefixes sorted by length
(longest first), compiled into a cached regex pattern. This applies to
keyword_finder, model_helper (split/strip/is_bdd), and semantic tokens. -
robot: Fix ${CURDIR} replacement in variable values and unify handling (13bf36b)
Extract replace_curdir_in_variable_values() helper into utils/variables.py
to deduplicate the ${CURDIR} substitution logic from _MyResourceBuilder and
NamespaceAnalyzer. Fixes incorrect double-backslash escaping in
_MyResourceBuilder that caused ${CURDIR} resolution to fail on Windows.
Documentation
- news: Add v2.5.1 release notes (b0d9fb9)
Refactor
-
diagnostics: Add debug logging for namespace cache misses (99e322d)
Log specific reasons when namespace cache entries are invalidated,
including source mtime changes, config fingerprint mismatches, and
dependency changes (libraries, resources, variables). Uses debug
level with context_name="cache" for targeted activation.
v2.5.0
Bug Fixes
-
robot: Strip trailing
=from variable names in resource builder (e11ca60) -
robot: Do not override the source on a model if there is already a source field (7e74c2d)
Newer Robot Framework versions already set the source field on File AST blocks, so overriding it here is unnecessary.
-
robot: Resolve relative library paths in namespace cache validation (45d8f9f)
Namespace cache validation failed for files importing libraries via
relative paths (e.g. ../../resources/libraries/common.py), causing
unnecessary full rebuilds on every warm start.Two issues fixed:
- validate_namespace_meta now passes the source file's directory as
base_dir when falling back to get_library_meta/get_variables_meta,
so relative paths resolve correctly - get_library_meta and get_variables_meta initialize import_name
before the try block to avoid UnboundLocalError when find_library
or find_variables fails
- validate_namespace_meta now passes the source file's directory as
-
robot: Correct check for init.py file in _is_valid_file function (ffad219)
-
robot: Add lock for _workspace_languages to prevent race condition (9bf0ee6)
WeakKeyDictionary is not thread-safe for concurrent read/write.
Protect all access to _workspace_languages with a dedicated RLock.
Documentation
-
news: Add supplementary release note for v2.5.0 (a8c39a3)
-
Update release notes for v2.5.0 with (9978a88)
-
Add news section to documentation site (7f14925)
Add a dedicated news section for release announcements with
auto-generated sidebar (sorted newest-first), content loader,
and redirect from /news/ to the latest article.
Features
-
analyze: Add cache management CLI commands (1421107)
Add
robotcode analyze cachesubcommand group with five commands:path: print resolved cache directoryinfo: show cache statistics with per-section breakdownlist: list cached entries with glob pattern filtering (-p)clear: remove cached entries by sectionprune: delete entire .robotcode_cache directory
Output adapts to the global --format flag (text/json/toml) and
--no-color mode. Text output uses rich-rendered markdown tables
when color is enabled, plain aligned tables otherwise. -
analyze: Enable namespace caching by default (d896213)
Namespace caching speeds up startup for large projects by skipping
re-analysis of unchanged files. It is now mature enough to be enabled
by default. -
analyze: Add --cache-namespaces/--no-cache-namespaces CLI option (b050c32)
Add option to enable/disable caching of fully analyzed namespace data
to disk. Disabled by default until the cache is fully optimized and
validated. When enabled, skips re-analysis of unchanged files on
startup, which can significantly speed up large projects.Available as CLI flag (--cache-namespaces/--no-cache-namespaces),
robot.toml setting (tool.robotcode-analyze.cache.cache_namespaces),
and VS Code setting (robotcode.analysis.cache.cacheNamespaces). -
analyze: Add collection of unused keywords and variables on the CLI (5734690)
Add support for collecting unused keyword and variable diagnostics when
runningrobotcode analyze codefrom the command line.The feature can be enabled in
robot.toml:[tool.robotcode-analyze.code] collect-unused = true
or controlled directly per invocation:
robotcode analyze code --collect-unused robotcode analyze code --no-collect-unused
-
langserver: Add code completion for
Literaltype hint values (42ab3a0)Keywords with
Literal["fast", "slow", "auto"]type hints now show
their allowed values in the completion list, making it easier to
discover and select valid argument values without checking the
keyword documentation.Also supports
Uniontypes containingLiteral, e.g.
Union[Literal["x", "y"], int]. -
language_server: Add json to watched file extensions (74e92b0)
-
plugin: Add
has_richproperty to detectrichavailability (4581cc6)Fall back to plain-text output in cache CLI commands when the
rich
package is not installed, instead of dumping raw unformatted markdown. -
robot: Add
ROBOTCODE_CACHE_DIRenv var for cache path override (a778cd5)Enable redirecting the analysis cache to a custom directory via the
ROBOTCODE_CACHE_DIRenvironment variable. This allows all RobotCode
tools — CLI commands, analyze runs, and the language server — to
share the same cache regardless of where it is stored.The VS Code extension automatically sets this variable in the
integrated terminal, so CLI commands find the correct cache
without any manual setup.Cache clearing now operates on the database directly instead of
removing the directory, preventing errors when multiple processes
access the cache concurrently. -
robot: Add advisory file locking to SQLite cache (b9351fc)
Add shared/exclusive advisory file locking (fcntl.flock) to prevent
prunefrom deleting a cache database while another process (language
server, analyze run) is using it. -
robot: Add SQLite cache backend for library and namespace data (edaea47)
Replace file-based pickle caching with a single SQLite database per
workspace, consolidating all cache entries into one file instead of
many individual .pkl files scattered across directories. -
robot: Add namespace disk cache for cold-start acceleration (abf3387)
Speed up first-time file analysis by caching fully resolved
namespace results to disk. On subsequent IDE starts, cached
namespaces are reused instead of re-analyzing every file from
scratch, significantly reducing the time until diagnostics,
code completion, and navigation become available.The cache is automatically invalidated when source files,
library dependencies, environment variables, command-line
variables, language configuration, or the RobotCode version
change. -
robot: Add ProjectIndex for O(1) workspace-wide reference lookups (6ef90f1)
Add an incrementally maintained inverse reference index (ProjectIndex)
scoped per WorkspaceFolder. On each file build, references are updated
in-place instead of scanning all files. All six reference types are
supported: keywords, variables, namespace entries, keyword tags,
testcase tags, and metadata. -
robot: Track tag and metadata references in namespace analysis (6a372fe)
Add structured reference tracking for tags and metadata during analysis.
Tags are split into keyword_tag_references and testcase_tag_references
to reflect their different semantics in Robot Framework (keyword visibility
vs test selection/reporting). Metadata references track settings-level
metadata entries by key. All reference keys are normalized for consistent
lookups. Remove unused TagDefinition class. -
settings: Remove deprecated robocop configuration options (fa2217e)
-
vscode: Show "What's New" notification after extension update (7fb2071)
Display an info notification when the extension version changes,
linking to the news page on robotcode.io via the built-in Simple Browser.
Also adds a public "RobotCode: Show What's New" command to the palette.
Performance
-
cache: Defer data blob loading in CacheEntry until first access (795c420)
-
diagnostics: Remove redundant exists() check in get_resource_meta (5696868)
-
diagnostics: Consolidate to single AST model and remove data_only parameter (e2e4cbd)
This eliminates the second cached AST model per document, saving ~500KB/doc
in...
v2.4.0
Bug Fixes
-
dependencies: Update click version to 8.2.0 in requirements files (6e1220e)
-
vscode: Fix invalid glob pattern in selectConfigurationProfiles (58b5a8f)
Remove extra closing brace in the file extension glob pattern that
caused workspace folder detection to fail when selecting configuration
profiles.
Features
- plugin: Add fast exit option to Application.exit method (acfa7e9)
Performance
-
diagnostics: Skip full AST model parsing when no robotcode: markers present (7b3999e)
-
robot: Cache LibraryDoc for robot and resource files on disk (9b89623)
Resource and robot files are now cached on disk between sessions.
On subsequent opens, imports, keywords, and variables from these
files are loaded from cache instead of being re-parsed, resulting
in faster startup and quicker response times when navigating
projects with many resource files.The cache is automatically invalidated when a file is modified
on disk. Files that are currently open in the editor always use
the live content and bypass the disk cache. -
robot: Remove unnecessary token list caching from document cache (5f8591d)
Token lists were cached separately in document._cache, but only used
as intermediate input for AST model building. No external caller ever
accessed the cached token lists directly.Move token generation into model builder methods so tokens are only
produced on cache miss. On cache hit, neither tokenization nor model
building occurs.- Eliminates up to 6 cached token lists per document in Language Server
- No behavior change for CLI (tokens were already uncached for version=None)
- Remove ~80 lines of redundant caching infrastructure
-
robot: Use file_id tuples instead of os.path.samefile for path comparison (3f3bd84)
Replace repeated os.path.samefile() calls (2x stat per call) in namespace
import loops with pre-computed (st_dev, st_ino) tuple comparisons.- Add FileId type, file_id() and same_file_id() to core utils
- Add lazy source_id property to LibraryDoc (excluded from pickle)
- Pre-compute source_id on Namespace init
- Compute file_id once per find_resource result instead of per-iteration
Refactor
-
imports_manager: Cleanup and fix correctness issues (25ef49c)
-
robot: Remove unnecessary finalizers and dispose chain (eaa7e14)
Remove redundant _release_watchers_finalizer from _ImportEntry — file
watcher cleanup is already handled explicitly by _remove_file_watcher()
during invalidation and by server_shutdown() at LS shutdown.Remove the _dispose_finalizer/dispose() chain through ImportsManager,
DocumentsCacheHelper, RobotFrameworkLanguageProvider, CodeAnalyzer, and
CLI. With the per-entry finalizers gone, these only cleared dicts that
Python already cleans up at process exit.Fix broken finalizer in Workspace.add_file_watchers() where the closure
captured the entry object, preventing it from ever being garbage
collected.Set atexit=False on sentinel finalizers so they only fire during normal
GC (needed for LS live cleanup), not at interpreter shutdown. -
robot: Replace del with weakref.finalize in imports_manager (e0e8d81)
Replace fragile
__del__methods withweakref.finalizein both
_ImportEntryandImportsManagerfor reliable cleanup:- _ImportEntry: register finalizer in init with file_watchers list
and file_watcher_manager as strong refs (no self access needed);
change _remove_file_watcher to use .clear() instead of = [] - ImportsManager: register finalizer lazily in executor property when
ProcessPoolExecutor is created; add static _shutdown_executor callback
weakref.finalize is guaranteed to run even with circular references
and does not prevent garbage collection of reference cycles. - _ImportEntry: register finalizer in init with file_watchers list
Testing
- Add library folder to test project (45c410f)
v2.3.1
v2.3.0
v2.2.0
Bug Fixes
-
intellij: Add missing language method in RobotCodeCodeStyleSettingsProvider (90673bf)
-
langserver: Default to folding ranges to character-based (6cbefe2)
Use character-based folding ranges by default when client capabilities are unknown.
-
robocop: Update robocop documentation urls (c15bdfa)
-
robot: Use explicit class reference for super() in VariablesDoc to allow slots (8af05a9)
Documentation
Features
- Add support for Robot Framework 7.4 (3e140c9)
- Enhance diagnostics and analysis features with progress indicators in verbose mode and performance improvements (1ac9247)
Performance
-
lsp: Use dataclass slots for protocol types (82012e8)
use @DataClass(slots=True) for LSP model classes to reduce per-instance memory overhead and speed up attribute access in LSP hot paths
Refactor
- core: Simplify casing caches and add support for PEP 604 unions (428226a)
- Reduce lru_cache maxsize for performance optimization across multiple modules (f715d32)
Testing
- Real pyproject file for test project (c3e17b2)
v2.1.0
Documentation
Features
-
vscode: Add option to control extension activation per scope (7af4583)
Add new
robotcode.disableExtensionconfiguration setting that allows
users to disable or enable the RobotCode extension at any scope level.With resource scope, users can:
- Disable the extension globally (user settings) and enable it for
specific workspaces or folders - Disable the extension for a workspace and enable it for specific
folders within - Disable the extension only for specific folders in multi-root
workspaces
This is useful in:
- Large workspaces where RobotCode is not needed everywhere
- Multi-root workspaces with mixed project types
- Environments where users want opt-in rather than opt-out behavior
- Disable the extension globally (user settings) and enable it for
Performance
-
vscode: Cache getRobotCodeProfiles results (8aa6db5)
Add caching for robot.toml profiles to avoid spawning a new process
on every call. Cache is invalidated on language client state changes.