@jonathan0823/pi-sonarqube 0.1.0 → 0.1.2

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.
@@ -0,0 +1,26 @@
1
+ # Contributing
2
+
3
+ Thanks for helping improve pi-sonarqube.
4
+
5
+ ## Setup
6
+
7
+ ```bash
8
+ npm install
9
+ npm run build
10
+ ```
11
+
12
+ ## Workflow
13
+
14
+ - Make small, focused changes.
15
+ - Edit `src/` first; do not hand-edit `dist/`.
16
+ - Keep docs and package metadata in sync when behavior changes.
17
+
18
+ ## Checks
19
+
20
+ - `npm run build`
21
+ - `npm pack` if you want to verify the published bundle
22
+
23
+ ## Commits
24
+
25
+ Use short, conventional commit messages.
26
+ example: `fix: correct typo in README` or `feat(sonar): add new rule for code quality`
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @jonathan0823/pi-sonarqube
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 | Description |
84
- |---------|-------------|
85
- | `/sonarqube init [alias] [path]` | Set up project config and optional alias |
86
- | `/sonarqube analyze [target]` | Run analysis for an alias or path |
87
- | `/sonarqube issues [target]` | Browse the latest analysis results for a target |
88
- | `/sonarqube open [target] <n>` | Preview source at issue #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
  ```
@@ -175,6 +128,10 @@ packages/pi-sonarqube/
175
128
  └── tsconfig.json
176
129
  ```
177
130
 
131
+ ## Contributing
132
+
133
+ See [CONTRIBUTING.md](CONTRIBUTING.md).
134
+
178
135
  ## License
179
136
 
180
137
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jonathan0823/pi-sonarqube",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "SonarQube extension for Pi — run local analysis and browse issues.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -16,6 +16,7 @@
16
16
  "dist/",
17
17
  "src/",
18
18
  "README.md",
19
+ "CONTRIBUTING.md",
19
20
  "LICENSE"
20
21
  ],
21
22
  "scripts": {
@@ -27,7 +28,8 @@
27
28
  "pi",
28
29
  "extension",
29
30
  "sonarqube",
30
- "code-quality"
31
+ "code-quality",
32
+ "pi-package"
31
33
  ],
32
34
  "license": "MIT",
33
35
  "author": "Jonathan0823",