Skip to content

Commit

Permalink
🐛 Disable project opening via activities flag #216 (QD-7787)
Browse files Browse the repository at this point in the history
- in qodana we don't open project via activities, flag must be enabled when we would want to do that
- see in intellij f036cf057bed40c54545826909e27f090667af06 com.jetbrains.python.sdk.PythonSdkUpdater#dropUpdaterInHeadless
  • Loading branch information
MekhailS authored and tiulpin committed Dec 11, 2023
1 parent b7c0cd9 commit 73573d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions core/core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1134,6 +1134,7 @@ func TestQodanaOptions_RequiresToken(t *testing.T) {
func propertiesFixture(enableStats bool, additionalProperties []string) []string {
properties := []string{
"-Dfus.internal.reduce.initial.delay=true",
"-Dide.warmup.use.predicates=false",
fmt.Sprintf("-Didea.application.info.value=%s", filepath.Join(os.TempDir(), "entrypoint", "QodanaAppInfo.xml")),
"-Didea.class.before.app=com.jetbrains.rider.protocol.EarlyBackendStarter",
fmt.Sprintf("-Didea.config.path=%s", filepath.Join(os.TempDir(), "entrypoint")),
Expand Down Expand Up @@ -1264,7 +1265,7 @@ func Test_Properties(t *testing.T) {
},
{
name: "override options from CLI, YAML should be ignored",
cliProperties: []string{"-Dfus.internal.reduce.initial.delay=false", "-Didea.application.info.value=0", "idea.headless.enable.statistics=false"},
cliProperties: []string{"-Dfus.internal.reduce.initial.delay=false", "-Dide.warmup.use.predicates=true", "-Didea.application.info.value=0", "idea.headless.enable.statistics=false"},
qodanaYaml: "" +
"version: \"1.0\"\n" +
"properties:\n" +
Expand All @@ -1273,8 +1274,9 @@ func Test_Properties(t *testing.T) {
isContainer: false,
expected: append([]string{
"-Dfus.internal.reduce.initial.delay=false",
"-Dide.warmup.use.predicates=true",
"-Didea.application.info.value=0",
}, propertiesFixture(false, []string{})[2:]...),
}, propertiesFixture(false, []string{})[3:]...),
},
} {
t.Run(tc.name, func(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion core/properties.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ func getPropertiesMap(
"-Didea.application.info.value": quoteIfSpace(appInfoXml),
"-Didea.log.path": quoteIfSpace(logDir),
"-Didea.qodana.thirdpartyplugins.accept": "true",
"-Dqodana.automation.guid": quoteIfSpace(analysisId),
"-Dqodana.automation.guid": QuoteIfSpace(analysisId),
"-Dide.warmup.use.predicates": "false",

"-XX:SoftRefLRUPolicyMSPerMB": "50",
"-XX:MaxJavaStackTraceDepth": "10000",
Expand Down

0 comments on commit 73573d3

Please sign in to comment.