Skip to content

Commit 3d8b8c4

Browse files
Merge pull request #183 from codacy/add-walkthrough
feat: add walkthrough
2 parents 94654dd + f6e8d52 commit 3d8b8c4

10 files changed

Lines changed: 895 additions & 1 deletion

File tree

package.json

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,83 @@
3333
],
3434
"main": "./dist/extension.js",
3535
"contributes": {
36+
"walkthroughs": [
37+
{
38+
"id": "codacy.setup",
39+
"title": "Get Started with Codacy",
40+
"description": "Set up quality checks, coverage visibility and AI guardrails in just a few steps.",
41+
"steps": [
42+
{
43+
"id": "codacy.walkthrough.cloudSync",
44+
"title": "Connect to Codacy",
45+
"description": "Create or sign-in to your account to customize analysis, PR overviews, see coverage in the IDE, and much more.\n\n[Connect to Codacy](command:codacy.codacyAuth)",
46+
"media": {
47+
"image": {
48+
"light": "resources/walkthrough/light/cloud-sync.svg",
49+
"dark": "resources/walkthrough/dark/cloud-sync.svg",
50+
"hc": "resources/walkthrough/dark/cloud-sync.svg",
51+
"hcLight": "resources/walkthrough/light/cloud-sync.svg"
52+
},
53+
"altText": "Cloud sync illustration showing connection to Codacy"
54+
},
55+
"completionEvents": [
56+
"onContext:Codacy:CodacyCloudStateContext == Loaded"
57+
]
58+
},
59+
{
60+
"id": "codacy.walkthrough.aiGuardrails",
61+
"title": "Set Up AI Guardrails",
62+
"description": "Control your AI-generated code with Codacy Guardrails.\n\nInstall the MCP Server to get access to Codacy information from your AI agent.\n\n[Install Codacy MCP](command:codacy.configureMCP)",
63+
"media": {
64+
"image": {
65+
"light": "resources/walkthrough/light/ai-guardrails.svg",
66+
"dark": "resources/walkthrough/dark/ai-guardrails.svg",
67+
"hc": "resources/walkthrough/dark/ai-guardrails.svg",
68+
"hcLight": "resources/walkthrough/light/ai-guardrails.svg"
69+
},
70+
"altText": "Shield icon representing AI guardrails protection"
71+
},
72+
"completionEvents": [
73+
"onContext:codacy:mcpConfigured"
74+
]
75+
},
76+
{
77+
"id": "codacy.walkthrough.localAnalysis",
78+
"title": "Install Local Analysis",
79+
"description": "Get instant feedback as you type by analyzing your code locally.\n\n[Install Codacy CLI](command:codacy.installCLI)\n\nInstalls all required dependencies: Node, Python, Java",
80+
"media": {
81+
"image": {
82+
"light": "resources/walkthrough/light/local-analysis.svg",
83+
"dark": "resources/walkthrough/dark/local-analysis.svg",
84+
"hc": "resources/walkthrough/dark/local-analysis.svg",
85+
"hcLight": "resources/walkthrough/light/local-analysis.svg"
86+
},
87+
"altText": "Terminal showing Codacy CLI analyzing code"
88+
},
89+
"completionEvents": [
90+
"onContext:codacy:cliInstalled"
91+
]
92+
},
93+
{
94+
"id": "codacy.walkthrough.customizeAnalysis",
95+
"title": "Customize Your Analysis",
96+
"description": "With your organization and repository added to Codacy, configure the patterns and standards you want to follow in the cloud and the IDE.\n\n[Configure patterns](command:codacy.configurePatterns)\n\nPlus you can adjust gates / goals for duplication, complexity and even coverage.",
97+
"media": {
98+
"image": {
99+
"light": "resources/walkthrough/light/customize-analysis.svg",
100+
"dark": "resources/walkthrough/dark/customize-analysis.svg",
101+
"hc": "resources/walkthrough/dark/customize-analysis.svg",
102+
"hcLight": "resources/walkthrough/light/customize-analysis.svg"
103+
},
104+
"altText": "Settings icon representing customization"
105+
},
106+
"completionEvents": [
107+
"onCommand:codacy.configurePatterns"
108+
]
109+
}
110+
]
111+
}
112+
],
36113
"viewsContainers": {
37114
"activitybar": [
38115
{
@@ -332,6 +409,12 @@
332409
"title": "Install Codacy CLI",
333410
"category": "Codacy commands",
334411
"when": "!codacy:cliInstalled && codacy:canInstallCLI"
412+
},
413+
{
414+
"command": "codacy.configurePatterns",
415+
"title": "Configure Patterns",
416+
"category": "Codacy commands",
417+
"when": "Codacy:CodacyCloudStateContext == Loaded"
335418
}
336419
],
337420
"menus": {

resources/walkthrough/dark/ai-guardrails.svg

Lines changed: 85 additions & 0 deletions
Loading

resources/walkthrough/dark/cloud-sync.svg

Lines changed: 120 additions & 0 deletions
Loading

resources/walkthrough/dark/customize-analysis.svg

Lines changed: 122 additions & 0 deletions
Loading

resources/walkthrough/dark/local-analysis.svg

Lines changed: 73 additions & 0 deletions
Loading

resources/walkthrough/light/ai-guardrails.svg

Lines changed: 84 additions & 0 deletions
Loading

resources/walkthrough/light/cloud-sync.svg

Lines changed: 120 additions & 0 deletions
Loading

resources/walkthrough/light/customize-analysis.svg

Lines changed: 120 additions & 0 deletions
Loading

resources/walkthrough/light/local-analysis.svg

Lines changed: 73 additions & 0 deletions
Loading

src/extension.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,26 @@ const registerCommands = async (context: vscode.ExtensionContext, codacyCloud: C
111111
await createOrUpdateRules(codacyCloud.params)
112112
},
113113
'codacy.onboarding.complete': () => {
114-
const { provider, organization } = codacyCloud.params!
114+
if (!codacyCloud.params) {
115+
Logger.error('Repository parameters are not available')
116+
return
117+
}
118+
const { provider, organization } = codacyCloud.params
115119
vscode.env.openExternal(
116120
vscode.Uri.parse(`https://app.codacy.com/organizations/${provider}/${organization}/dashboard`)
117121
)
118122
Config.updateOnboardingSkipped(false)
119123
},
124+
'codacy.configurePatterns': () => {
125+
if (!codacyCloud.params) {
126+
Logger.error('Cannot configure patterns: repository parameters are not available')
127+
return
128+
}
129+
const { provider, organization, repository } = codacyCloud.params
130+
vscode.env.openExternal(
131+
vscode.Uri.parse(`https://app.codacy.com/${provider}/${organization}/${repository}/patterns`)
132+
)
133+
},
120134
}
121135

122136
Object.keys(commands).forEach((cmd) => {

0 commit comments

Comments
 (0)