Skip to content

Add Qodana CLI shell plugin#629

Open
eddumelendez wants to merge 1 commit into
1Password:mainfrom
eddumelendez:qodana-support
Open

Add Qodana CLI shell plugin#629
eddumelendez wants to merge 1 commit into
1Password:mainfrom
eddumelendez:qodana-support

Conversation

@eddumelendez

@eddumelendez eddumelendez commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Overview

Adds a shell plugin for the Qodana CLI, JetBrains' static analysis tool. The plugin provisions the QODANA_TOKEN environment variable so qodana scan and qodana send can authenticate to Qodana Cloud without manually exporting the token.

Type of change

  • Created a new plugin
  • Improved an existing plugin
  • Fixed a bug in an existing plugin
  • Improved contributor utilities or experience

Related Issue(s)

  • Resolves: #
  • Relates: #

How To Test

Install the Qodana CLI (brew install jetbrains/utils/qodana) and store your project token in 1Password, then run:

qodana scan

Changelog

Authenticate the Qodana CLI using 1Password Shell Plugins to automatically provision QODANA_TOKEN when running qodana scan or qodana send.

Copilot AI review requested due to automatic review settings July 17, 2026 04:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a new 1Password Shell Plugin for the Qodana CLI to provision authentication material via environment variables when running qodana.

Changes:

  • Introduces a new qodana plugin with platform metadata and one executable.
  • Adds an API token credential type provisioned/imported via QODANA_TOKEN.
  • Adds unit tests covering token provisioning/import.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
plugins/qodana/plugin.go Declares the qodana plugin (platform info, credential types, executables).
plugins/qodana/qodana.go Defines the Qodana CLI executable and its NeedsAuth rules.
plugins/qodana/project_token.go Defines the credential type and env-var provisioner/importer mapping.
plugins/qodana/project_token_test.go Adds tests for the credential importer/provisioner behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread plugins/qodana/project_token.go
Comment on lines +11 to +26
func TestProjectTokenImporter(t *testing.T) {
plugintest.TestImporter(t, ProjectToken().Importer, map[string]plugintest.ImportCase{
"QODANA_TOKEN environment variable": {
Environment: map[string]string{
"QODANA_TOKEN": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.EXAMPLE",
},
ExpectedCandidates: []sdk.ImportCandidate{
{
Fields: map[sdk.FieldName]string{
fieldname.Token: "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.EXAMPLE",
},
},
},
},
})
}
Comment thread plugins/qodana/project_token_test.go
Comment thread plugins/qodana/qodana.go
Comment on lines +15 to +19
NeedsAuth: needsauth.IfAll(
needsauth.NotForHelpOrVersion(),
needsauth.NotWhenContainsArgs("cloc"),
needsauth.NotWhenContainsArgs("completion"),
needsauth.NotWhenContainsArgs("contributors"),
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