Skip to content

feat: Add support for local cfn-lint executable#407

Open
kddejong wants to merge 2 commits intomainfrom
feat/diagnostics/lint/local
Open

feat: Add support for local cfn-lint executable#407
kddejong wants to merge 2 commits intomainfrom
feat/diagnostics/lint/local

Conversation

@kddejong
Copy link
Collaborator

Description

Adds support for using a locally installed cfn-lint executable instead of the bundled Pyodide version. This provides users with the flexibility to use their own cfn-lint installation with custom configurations and faster execution times.

Changes

  • Added path setting to CfnLintSettings to specify local cfn-lint executable path
  • Created LocalCfnLintExecutor class to execute local cfn-lint via child process
  • Modified CfnLintService to switch between local executor and Pyodide worker based on path setting
  • Added telemetry tracking for both initialization types (initialized.local and initialized.pyodide)

Configuration

Users can configure the local cfn-lint path in their settings:

{
 "aws.cloudformation.diagnostics.cfnLint.path": "/path/to/cfn-lint"
}

When path is empty or not set, the service falls back to the bundled Pyodide version.

Testing

  • All existing tests pass (3,478 tests)
  • 91.04% code coverage maintained
  • Added tests for local executor path switching

Related

This aligns with the AWS Toolkit setting: aws.cloudformation.diagnostics.cfnLint.path

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@kddejong kddejong requested a review from a team as a code owner January 26, 2026 19:13
this.updateExecutor();
}

private updateExecutor(): void {
Copy link
Collaborator

Choose a reason for hiding this comment

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

If settings change while LSP is running, does the PyodideWorkerManager need to be shutdown?

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