@jonathan0823/pi-sonarqube 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -57
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# pi-sonarqube
|
|
2
2
|
|
|
3
3
|
A Pi extension to run local SonarQube analysis and browse the resulting issues — all from within Pi.
|
|
4
4
|
|
|
@@ -42,6 +42,7 @@ For monorepos, you can add a user-defined alias and optional path:
|
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
Pi will ask you for:
|
|
45
|
+
|
|
45
46
|
- **SonarQube server URL** (prefilled with `http://localhost:9000`)
|
|
46
47
|
- **Project key** (default: derived from directory name)
|
|
47
48
|
- **Token** (optional, used when your server requires auth)
|
|
@@ -57,6 +58,7 @@ The config is saved to `<project>/.pi/sonarqube.json`. Alias mappings live in th
|
|
|
57
58
|
```
|
|
58
59
|
|
|
59
60
|
Pi will:
|
|
61
|
+
|
|
60
62
|
1. Run `sonar-scanner` against your server
|
|
61
63
|
2. Wait for the analysis to complete
|
|
62
64
|
3. Fetch the latest issues
|
|
@@ -80,16 +82,17 @@ Use **Up/Down** to move, **Enter** to preview the affected source code, and **Es
|
|
|
80
82
|
|
|
81
83
|
## Commands
|
|
82
84
|
|
|
83
|
-
| Command
|
|
84
|
-
|
|
85
|
-
| `/sonarqube init [alias] [path]` | Set up project config and optional alias
|
|
86
|
-
| `/sonarqube analyze [target]`
|
|
87
|
-
| `/sonarqube issues [target]`
|
|
88
|
-
| `/sonarqube open [target] <n>`
|
|
85
|
+
| Command | Description |
|
|
86
|
+
| -------------------------------- | ----------------------------------------------- |
|
|
87
|
+
| `/sonarqube init [alias] [path]` | Set up project config and optional alias |
|
|
88
|
+
| `/sonarqube analyze [target]` | Run analysis for an alias or path |
|
|
89
|
+
| `/sonarqube issues [target]` | Browse the latest analysis results for a target |
|
|
90
|
+
| `/sonarqube open [target] <n>` | Preview source at issue #n |
|
|
89
91
|
|
|
90
92
|
## Tool (for the LLM)
|
|
91
93
|
|
|
92
94
|
The extension also registers a `sonarqube` tool that the LLM can call with actions:
|
|
95
|
+
|
|
93
96
|
- `analyze` — run analysis
|
|
94
97
|
- `issues` — list issues
|
|
95
98
|
- `open` — open an issue with its index
|
|
@@ -106,56 +109,6 @@ Targets can be an alias like `fe` or a path like `apps/web`.
|
|
|
106
109
|
3. **Scan properties** — `sonar-project.properties`
|
|
107
110
|
4. **Defaults** — `http://localhost:9000`, project key from directory slug
|
|
108
111
|
|
|
109
|
-
## Publishing
|
|
110
|
-
|
|
111
|
-
### Prerequisites
|
|
112
|
-
|
|
113
|
-
- An [npm](https://www.npmjs.com/) account
|
|
114
|
-
- The npm scope `@jonathan0823` assigned to your npm user
|
|
115
|
-
|
|
116
|
-
### Publish
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
cd packages/pi-sonarqube
|
|
120
|
-
|
|
121
|
-
# Login if needed
|
|
122
|
-
npm login
|
|
123
|
-
|
|
124
|
-
# Publish (builds automatically via prepack)
|
|
125
|
-
npm publish
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
### Publish a new version
|
|
129
|
-
|
|
130
|
-
```bash
|
|
131
|
-
# Update version in package.json
|
|
132
|
-
npm version patch # or minor / major
|
|
133
|
-
|
|
134
|
-
# Publish
|
|
135
|
-
npm publish
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### Test locally before publishing
|
|
139
|
-
|
|
140
|
-
```bash
|
|
141
|
-
cd packages/pi-sonarqube
|
|
142
|
-
|
|
143
|
-
# Create a tarball
|
|
144
|
-
npm pack
|
|
145
|
-
|
|
146
|
-
# Install it in a test project
|
|
147
|
-
cd /tmp/test-project
|
|
148
|
-
npm install /path/to/pi-sonarqube-0.1.0.tgz
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
## Manual via `pi install`
|
|
152
|
-
|
|
153
|
-
You can also install directly from a local path:
|
|
154
|
-
|
|
155
|
-
```bash
|
|
156
|
-
pi install /path/to/packages/pi-sonarqube
|
|
157
|
-
```
|
|
158
|
-
|
|
159
112
|
## Project structure
|
|
160
113
|
|
|
161
114
|
```
|