Documentation ¶
Index ¶
- Constants
- Variables
- func GetCloudTeamsPageUrl(origin string, path string) string
- func GetEnvWithDefault(env string, defaultValue string) string
- func GetEnvWithDefaultInt(env string, defaultValue int) int
- func GetReportUrl(resultsDir string) string
- func RequestLicenseData(endpoint string, token string) ([]byte, error)
- func SaveReportFile(resultsDir, reportUrl string)
- type APIError
- type LicenseData
- type LicenseToken
- type QdClient
- type RequestError
- type RequestResult
- type Success
Constants ¶
View Source
const ( QodanaEndpoint = "ENDPOINT" DefaultEndpoint = "qodana.cloud" )
View Source
const ( QodanaLicenseRequestCooldownEnv = "QODANA_LICENSE_REQUEST_COOLDOWN" QodanaLicenseRequestTimeoutEnv = "QODANA_LICENSE_REQUEST_TIMEOUT" QodanaLicenseRequestAttemptsCountEnv = "QODANA_LICENSE_ATTEMPTS" )
View Source
const DeclinedTokenErrorMessage = `` /* 257-byte string literal not displayed */
View Source
const InvalidTokenMessage = `QODANA_TOKEN is invalid, please provide a valid token`
Variables ¶
View Source
var ( GitHubBotSuffix = "[bot]@users.noreply.github.com" CommonGitBots = []string{ "cla-bot@users.noreply.github.com", "codecov-io@users.noreply.github.com", "snyk-bot@snyk.io", "gitlab-bot@gitlab.com", "bot@swc.rs", } )
View Source
var EapWarnTokenMessage = fmt.Sprintf(`
Starting from version 2023.2 release versions of Qodana Linters will require connection to Qodana Cloud.
For seamless transition to release versions, obtain your token by registering at %s
and provide the token as the QODANA_TOKEN environment variable.
For more details, please visit: https://www.jetbrains.com/help/qodana/cloud-quickstart.html`, getCloudBaseUrl())
View Source
var EmptyTokenMessage = fmt.Sprintf(`Starting from version 2023.2 release versions of Qodana Linters require connection to Qodana Cloud.
To continue using Qodana, please ensure you have an access token and provide the token as the QODANA_TOKEN environment variable.
Obtain your token by registering at %s
For more details, please visit: https://www.jetbrains.com/help/qodana/cloud-quickstart.html
We also offer Community versions as an alternative. You can find them here: https://www.jetbrains.com/help/qodana/linters.html
`, getCloudBaseUrl())
View Source
var GeneralLicenseErrorMessage = fmt.Sprintf(`
Please check if %s is accessible from your environment.
If you encounter any issues, please contact us at qodana-support@jetbrains.com.
Or use our issue tracker at https://jb.gg/qodana-issue`, getCloudBaseUrl())
View Source
var TokenDeclinedError = errors.New("token was declined by Qodana Cloud server")
Functions ¶
func GetCloudTeamsPageUrl ¶
GetCloudTeamsPageUrl returns the team page URL on Qodana Cloud
func GetEnvWithDefault ¶
func GetEnvWithDefaultInt ¶
func GetReportUrl ¶ added in v2023.3.0
GetReportUrl retrieves the Qodana Cloud report URL from the qodana.sarif.json in the specified results directory.
func SaveReportFile ¶ added in v2023.3.0
func SaveReportFile(resultsDir, reportUrl string)
SaveReportFile saves the report URL to the resultsDir/open-in-ide.json file if it does not exist.
Types ¶
type LicenseData ¶ added in v2023.3.0
type LicenseData struct { LicenseID string `json:"licenseId"` LicenseKey string `json:"licenseKey"` ExpirationDate string `json:"expirationDate"` ProjectIdHash string `json:"projectIdHash"` LicensePlan string `json:"licensePlan"` }
func DeserializeLicenseData ¶ added in v2023.3.0
func DeserializeLicenseData(data []byte) LicenseData
type LicenseToken ¶
type LicenseToken struct { Token string // LicenseOnly is true if the token is used only for license verification LicenseOnly bool }
var Token LicenseToken
func (*LicenseToken) IsAllowedToSendFUS ¶
func (o *LicenseToken) IsAllowedToSendFUS() bool
func (*LicenseToken) IsAllowedToSendReports ¶
func (o *LicenseToken) IsAllowedToSendReports() bool
type QdClient ¶
type QdClient struct {
// contains filtered or unexported fields
}
func NewQdClient ¶
func (*QdClient) ValidateToken ¶
func (client *QdClient) ValidateToken() interface{}
type RequestError ¶
type RequestError struct {
Err error
}
type RequestResult ¶
type RequestResult interface {
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.