Skip to content

Commit b363950

Browse files
authored
Merge pull request #63 from OpenForgeProject/fix-ai-findings
Fix Code Quality Findings
2 parents ffce313 + 102007c commit b363950

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

CHANGELOG.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ All notable changes to this project will be documented in this file. This projec
44

55
## [0.5.0](https://github.com/OpenForgeProject/vscode-ddev-phpstan/compare/v0.4.2...v0.5.0) (2026-01-12)
66

7-
87
### Features
98

10-
* update release management ([6c5c5ac](https://github.com/OpenForgeProject/vscode-ddev-phpstan/commit/6c5c5acc4a8609bb6dd3262c21a771abef182f93))
9+
* **Release Management**: Refined release workflow with conditional execution and updated token configuration ([6c5c5ac](https://github.com/OpenForgeProject/vscode-ddev-phpstan/commit/6c5c5acc4a8609bb6dd3262c21a771abef182f93))
1110

12-
## [0.4.2] - 2025-10-01
11+
## [0.4.2](https://github.com/OpenForgeProject/vscode-ddev-phpstan/compare/v0.4.1...v0.4.2) (2025-10-01)
1312

1413
### Changed
1514

@@ -32,7 +31,7 @@ All notable changes to this project will be documented in this file. This projec
3231
- Custom changelog parsing for meaningful release notes
3332
- Maintained compatibility across all supported platforms (macOS, Ubuntu, Windows)
3433

35-
## [0.4.1] - 2025-10-01
34+
## [0.4.1](https://github.com/OpenForgeProject/vscode-ddev-phpstan/compare/v0.4.0...v0.4.1) (2025-10-01)
3635

3736
### Added
3837

@@ -56,7 +55,7 @@ All notable changes to this project will be documented in this file. This projec
5655
- Maintained full functionality while reducing package size
5756
- GitHub Actions ready for automated marketplace publishing
5857

59-
## [0.4.0] - 2025-09-30
58+
## [0.4.0](https://github.com/OpenForgeProject/vscode-ddev-phpstan/compare/v0.3.0...v0.4.0) (2025-09-30)
6059

6160
### Changed
6261

@@ -81,7 +80,7 @@ All notable changes to this project will be documented in this file. This projec
8180
- Enhanced type annotations for esbuild plugins and configuration objects
8281
- Maintained full backward compatibility with existing functionality
8382

84-
## [0.3.0] - 2025-09-30
83+
## [0.3.0](https://github.com/OpenForgeProject/vscode-ddev-phpstan/compare/v0.2.0...v0.3.0) (2025-09-30)
8584

8685
### Updated
8786

@@ -110,7 +109,7 @@ All notable changes to this project will be documented in this file. This projec
110109
- Enhanced build performance with latest esbuild version
111110
- Modernized GitHub Actions for better CI/CD reliability
112111

113-
## [0.2.0] - 2025-09-30
112+
## [0.2.0](https://github.com/OpenForgeProject/vscode-ddev-phpstan/compare/v0.1.0...v0.2.0) (2025-09-30)
114113

115114
### Added
116115

@@ -143,7 +142,7 @@ All notable changes to this project will be documented in this file. This projec
143142
- Multi-platform compatibility testing
144143
- Security vulnerability scanning
145144

146-
## [0.1.0] - 2025-09-30
145+
## [0.1.0](https://github.com/OpenForgeProject/vscode-ddev-phpstan/releases/tag/v0.1.0) (2025-09-30)
147146

148147
### Added
149148

src/test/ddev-utils.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ suite('DdevUtils Test Suite', () => {
4343
const result = DdevUtils.hasDdevProject('/test/workspace');
4444

4545
assert.strictEqual(result, true);
46-
assert.strictEqual(existsSyncStub.calledOnce, true);
46+
sinon.assert.calledOnce(existsSyncStub);
4747
});
4848

4949
test('hasDdevProject returns false when .ddev/config.yaml does not exist', () => {
@@ -52,6 +52,7 @@ suite('DdevUtils Test Suite', () => {
5252
const result = DdevUtils.hasDdevProject('/test/workspace');
5353

5454
assert.strictEqual(result, false);
55+
sinon.assert.calledOnce(existsSyncStub);
5556
});
5657

5758
test('isDdevRunning returns true when DDEV container is running', () => {
@@ -105,7 +106,7 @@ suite('DdevUtils Test Suite', () => {
105106
const result = DdevUtils.validateDdevTool('phpstan', '/test/workspace');
106107

107108
assert.strictEqual(result.isValid, true);
108-
assert.strictEqual(result.errorType, undefined);
109+
assert.ok(result.errorType === undefined);
109110
});
110111

111112
test('validateDdevTool returns error message for DDEV issues', () => {
@@ -120,7 +121,7 @@ suite('DdevUtils Test Suite', () => {
120121

121122
assert.strictEqual(result.isValid, false);
122123
assert.strictEqual(result.errorType, 'ddev-not-running');
123-
assert.ok(result.userMessage?.includes('appears to be stopped'));
124+
assert.ok(result.userMessage && result.userMessage.includes('appears to be stopped'));
124125
});
125126

126127
test('validateDdevTool returns tool not found message when tool is missing', () => {
@@ -145,7 +146,7 @@ suite('DdevUtils Test Suite', () => {
145146
const result = DdevUtils.execDdev(['phpstan', 'analyze'], '/test/workspace');
146147

147148
assert.strictEqual(result, 'output');
148-
assert.strictEqual(spawnSyncStub.calledOnce, true);
149+
sinon.assert.calledOnce(spawnSyncStub);
149150
const callArgs = spawnSyncStub.firstCall.args;
150151
assert.strictEqual(callArgs[0], 'ddev');
151152
assert.deepStrictEqual(callArgs[1], ['exec', 'env', 'XDEBUG_MODE=off', 'phpstan', 'analyze']);

0 commit comments

Comments
 (0)