Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚸 Obtain token for 3rd party linters the same way as for others #344

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions platform/cmd/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Note that most options can be configured via qodana.yaml (https://www.jetbrains.
But you can always override qodana.yaml options with the following command-line options.
`, (*linterInfo).GetInfo(options).LinterName),
RunE: func(cmd *cobra.Command, args []string) error {
log.SetFormatter(&log.TextFormatter{DisableQuote: true, DisableTimestamp: true})
exitCode, err := platform.RunAnalysis(options)
log.Debug("exitCode: ", exitCode)
if exitCode == platform.QodanaFailThresholdExitCode {
Expand Down
3 changes: 2 additions & 1 deletion platform/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,11 @@ func ensureWorkingDirsCreated(options *QodanaOptions, mountInfo *MountInfo) erro

func checkLinterLicense(options *QodanaOptions, linterInfo *LinterInfo) {
var err error
cloud.SetupLicenseToken(options.GetToken())
cloud.SetupLicenseToken(options.LoadToken(false, false, true))
if cloud.Token.Token != "" {
licenseData := cloud.GetCloudApiEndpoints().GetLicenseData(cloud.Token.Token)
options.LicensePlan = licenseData.LicensePlan
SuccessMessage("Qodana license plan: %s", options.LicensePlan)
options.ProjectIdHash = licenseData.ProjectIdHash
} else {
if !linterInfo.IsEap {
Expand Down
Loading