Skip to content

Commit 6574304

Browse files
authored
chore: prepare for CCI ui FeatureFlag to always be true (#678)
1 parent 1d37efa commit 6574304

File tree

3 files changed

+34
-31
lines changed

3 files changed

+34
-31
lines changed

package.json

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,29 @@
169169
"description": "Severity issues to display.",
170170
"scope": "window"
171171
},
172+
"snyk.issueViewOptions": {
173+
"order": 6,
174+
"type": "object",
175+
"default": {
176+
"openIssues": true,
177+
"ignoredIssues": false
178+
},
179+
"properties": {
180+
"openIssues": {
181+
"type": "boolean",
182+
"description": "Open Issues",
183+
"default": true
184+
},
185+
"ignoredIssues": {
186+
"type": "boolean",
187+
"description": "Ignored Issues",
188+
"default": false
189+
}
190+
},
191+
"additionalProperties": false,
192+
"markdownDescription": "[Code Consistent Ignores](https://docs.snyk.io/manage-risk/prioritize-issues-for-fixing/ignore-issues/consistent-ignores-for-snyk-code) is a feature which provides consistent handling of \"ignore\" rules for code security findings across all surfaces - such as the CLI, IDE, and Snyk UI\n\nShow the following issues:",
193+
"scope": "window"
194+
},
172195
"snyk.allIssuesVsNetNewIssues": {
173196
"type": "string",
174197
"default": "All issues",
@@ -181,13 +204,13 @@
181204
"Shows all issues that have been identified, including both new and existing issues.",
182205
"Shows only new issues filtering out previously known issues in a base branch"
183206
],
184-
"order": 6
207+
"order": 7
185208
},
186209
"snyk.advanced.additionalParameters": {
187210
"type": "string",
188211
"description": "Parameters to pass to Snyk CLI for Open Source security tests.",
189212
"scope": "window",
190-
"order": 7
213+
"order": 8
191214
}
192215
}
193216
},
@@ -233,45 +256,22 @@
233256
"title": "Experimental",
234257
"order": 4,
235258
"properties": {
236-
"snyk.issueViewOptions": {
237-
"order": 1,
238-
"type": "object",
239-
"default": {
240-
"openIssues": true,
241-
"ignoredIssues": false
242-
},
243-
"properties": {
244-
"openIssues": {
245-
"type": "boolean",
246-
"description": "Open Issues",
247-
"default": true
248-
},
249-
"ignoredIssues": {
250-
"type": "boolean",
251-
"description": "Ignored Issues",
252-
"default": false
253-
}
254-
},
255-
"additionalProperties": false,
256-
"markdownDescription": "Ignored issues are currently an experimental feature. Please reach out to [support.snyk.io](https://support.snyk.io) for more details.\n\nShow the following issues:",
257-
"scope": "window"
258-
},
259259
"snyk.folderConfigs": {
260-
"order": 2,
260+
"order": 1,
261261
"type": "array",
262262
"default": [],
263263
"description": "Folder configuration for Snyk scans."
264264
},
265265
"snyk.securityAtInception.autoConfigureSnykMcpServer": {
266-
"order": 3,
266+
"order": 2,
267267
"type": "boolean",
268268
"description": "Configure Snyk MCP server",
269269
"default": false,
270270
"markdownDescription": "Configure Snyk MCP server",
271271
"scope": "window"
272272
},
273273
"snyk.securityAtInception.executionFrequency": {
274-
"order": 4,
274+
"order": 3,
275275
"type": "string",
276276
"description": "Choose when Snyk should scan and initiate fixes for your AI-generated code",
277277
"default": "Manual",
@@ -289,7 +289,7 @@
289289
"scope": "window"
290290
},
291291
"snyk.features.preview": {
292-
"order": 5,
292+
"order": 4,
293293
"type": "object",
294294
"default": {},
295295
"title": "Preview feature toggles",

src/snyk/snykCode/views/issueTreeProvider.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ export class IssueTreeProvider extends ProductIssueTreeProvider<CodeIssueData> {
160160
if (totalIssueCount === 0) {
161161
return analysisMessages.congratsNoIssuesFound;
162162
} else {
163+
if (ignoredIssueCount === 0) {
164+
return `✋ ${openIssuesText}`;
165+
}
163166
return `✋ ${openIssuesText} & ${ignoredIssuesText}`;
164167
}
165168
}

src/test/integration/securityIssueTreeProvider.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ suite('Code Security Issue Tree Provider', () => {
136136
name: 'getRootChildren returns correctly when viewing open & ignored and have two open issues one fixable with CCI enabled',
137137
consistentIgnores: true,
138138
issueViewOptions: { openIssues: true, ignoredIssues: true },
139-
issues: [makeMockCodeIssue(), makeMockCodeIssue({ additionalData: { hasAIFix: true } })],
140-
expectedNodeLabels: ['✋ 2 open issues & 0 ignored issues', '⚡️ 1 open issue is fixable by Snyk Agent Fix.'],
139+
issues: [makeMockCodeIssue({ isIgnored: true }), makeMockCodeIssue({ additionalData: { hasAIFix: true } })],
140+
expectedNodeLabels: ['✋ 1 open issue & 1 ignored issue', '⚡️ 1 open issue is fixable by Snyk Agent Fix.'],
141141
},
142142
{
143143
name: 'getRootChildren returns correctly when viewing only open and have none with CCI enabled',

0 commit comments

Comments
 (0)