Skip to content

Commit

Permalink
🚸 Obtain token for 3rd party linters the same way as for others. (#344)
Browse files Browse the repository at this point in the history
Change output formatter to stop quoting new lines in errors.
  • Loading branch information
hybloid authored and qodana-bot committed Apr 30, 2024
1 parent 1e123ac commit 8e5ea66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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

0 comments on commit 8e5ea66

Please sign in to comment.