Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 27 additions & 22 deletions .github/workflows/super-linter-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
on:
workflow_dispatch:
schedule:
- cron: "0 14 * * 1-5" # 2 PM UTC, weekdays only
- cron: '0 14 * * 1-5' # 2 PM UTC, weekdays only
permissions:
contents: read
actions: read
safe-outputs:
create-issue:
title-prefix: "[linter] "
title-prefix: '[linter] '
labels: [automation, code-quality]
engine: copilot
name: Super Linter Report
Expand All @@ -18,16 +18,16 @@ steps:
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm

- name: Install Dependencies
run: npm ci

- name: Run Super Linter
id: super-linter
continue-on-error: true
Expand All @@ -40,16 +40,16 @@ steps:
LINTER_RULES_PATH: .
VALIDATE_ALL_CODEBASE: true
# Disable linters that are covered by other workflows or not applicable
VALIDATE_BIOME_FORMAT: false # Prettier is used instead
VALIDATE_BIOME_LINT: false # ESLint is used instead
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false # Separate security workflow
VALIDATE_JAVASCRIPT_ES: false # ESLint handles JS/TS linting
VALIDATE_JSCPD: false # Copy-paste detection not required
VALIDATE_TYPESCRIPT_ES: false # ESLint handles TypeScript
VALIDATE_JSON: false # Not strictly enforced in this project
VALIDATE_BIOME_FORMAT: false # Prettier is used instead
VALIDATE_BIOME_LINT: false # ESLint is used instead
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false # Separate security workflow
VALIDATE_JAVASCRIPT_ES: false # ESLint handles JS/TS linting
VALIDATE_JSCPD: false # Copy-paste detection not required
VALIDATE_TYPESCRIPT_ES: false # ESLint handles TypeScript
VALIDATE_JSON: false # Not strictly enforced in this project
LOG_FILE: super-linter.log
CREATE_LOG_FILE: true

- name: Save Linter Output
if: always()
run: |
Expand All @@ -59,7 +59,7 @@ steps:
else
echo "No super-linter.log file found" > /tmp/gh-aw/linter-output.txt
fi

# Also capture GitHub step summary if available
if [ -n "$GITHUB_STEP_SUMMARY" ]; then
echo "" >> /tmp/gh-aw/linter-output.txt
Expand All @@ -73,7 +73,8 @@ tools:

# Super Linter Analysis Report

You are an expert code quality analyst. Your task is to analyze the super-linter output and create a comprehensive issue report.
You are an expert code quality analyst. Your task is to analyze the super-linter
output and create a comprehensive issue report.

## Context

Expand All @@ -83,7 +84,8 @@ You are an expert code quality analyst. Your task is to analyze the super-linter

## Your Task

1. **Read the linter output** from `/tmp/gh-aw/linter-output.txt` using the bash tool
1. **Read the linter output** from `/tmp/gh-aw/linter-output.txt` using the bash
tool
2. **Analyze the findings**:
- Categorize errors by severity (critical, high, medium, low)
- Group errors by file or linter type
Expand All @@ -92,27 +94,28 @@ You are an expert code quality analyst. Your task is to analyze the super-linter
3. **Create a detailed issue** with the following structure:

### Issue Title

Use format: "Code Quality Report - [Date] - [X] issues found"

### Issue Body Structure

```markdown
## 🔍 Super Linter Analysis Summary

**Date**: [Current date]
**Total Issues Found**: [Number]
**Run ID**: ${{ github.run_id }}
**Date**: [Current date] **Total Issues Found**: [Number] **Run ID**:
${{ github.run_id }}

## 📊 Breakdown by Severity

- **Critical**: [Count and brief description]
- **High**: [Count and brief description]
- **High**: [Count and brief description]
- **Medium**: [Count and brief description]
- **Low**: [Count and brief description]

## 📁 Issues by Category

### [Category/Linter Name]

- **File**: `path/to/file`
- Line [X]: [Error description]
- Impact: [Why this matters]
Expand All @@ -130,9 +133,10 @@ Use format: "Code Quality Report - [Date] - [X] issues found"

<details>
<summary>Click to expand complete linter log</summary>

```

[Include the full linter output here]

```

</details>
Expand All @@ -154,4 +158,5 @@ Use format: "Code Quality Report - [Date] - [X] issues found"

## Security Note

Treat linter output as potentially sensitive. Do not expose credentials, API keys, or other secrets that might appear in file paths or error messages.
Treat linter output as potentially sensitive. Do not expose credentials, API
keys, or other secrets that might appear in file paths or error messages.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ typings/
.DS_Store
Thumbs.db

# Ignore built ts files
__tests__/runner/*

# IDE files
.idea
*.code-workspace
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export default [
allowDefaultProject: [
'__fixtures__/*.ts',
'__tests__/*.ts',
'src/*.test.ts',
'eslint.config.mjs',
'vitest.config.ts',
'rollup.config.ts'
Expand Down
4 changes: 1 addition & 3 deletions __tests__/docker.test.ts → src/docker.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ vi.mock('child_process', () => ({
}))

// Import the module being tested
const { runDockerContainer, stopDockerContainer } = await import(
'../src/docker.js'
)
const { runDockerContainer, stopDockerContainer } = await import('./docker.js')

describe('docker.ts', () => {
beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/logging.test.ts → src/logging.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ vi.mock('debug', () => ({
}))

// Import the module being tested
const { setupDebugLogging } = await import('../src/logging.js')
const { setupDebugLogging } = await import('./logging.js')
const debug = await import('debug')

describe('logging.ts', () => {
Expand Down
4 changes: 2 additions & 2 deletions __tests__/main.test.ts → src/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ const mockCore = {
const mockStartProxy = vi.fn()

vi.mock('@actions/core', () => mockCore)
vi.mock('../src/server.js', () => ({
vi.mock('./server.js', () => ({
startProxy: mockStartProxy
}))

// Import the module being tested
const { run } = await import('../src/main.js')
const { run } = await import('./main.js')

describe('main.ts', () => {
beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/port.test.ts → src/port.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ vi.mock('node:net', () => ({
}))

// Import the module being tested
const { findFreePort } = await import('../src/port.js')
const { findFreePort } = await import('./port.js')

describe('port.ts', () => {
beforeEach(() => {
Expand Down
8 changes: 4 additions & 4 deletions __tests__/server.test.ts → src/server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,21 @@ vi.mock('@modelcontextprotocol/sdk/types.js', () => ({
ListToolsRequestSchema: {}
}))

vi.mock('../src/port.js', () => ({
vi.mock('./port.js', () => ({
findFreePort: mockFindFreePort
}))

vi.mock('../src/docker.js', () => ({
vi.mock('./docker.js', () => ({
runDockerContainer: mockRunDockerContainer,
stopDockerContainer: mockStopDockerContainer
}))

vi.mock('../src/logging.js', () => ({
vi.mock('./logging.js', () => ({
setupDebugLogging: mockSetupDebugLogging
}))

// Import the module being tested
const { startProxy } = await import('../src/server.js')
const { startProxy } = await import('./server.js')

describe('server.ts', () => {
beforeEach(() => {
Expand Down
8 changes: 7 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
"strictNullChecks": true,
"target": "ES2022"
},
"exclude": ["__fixtures__", "__tests__", "coverage", "dist", "node_modules"],
"exclude": [
"__fixtures__",
"**/*.test.ts",
"coverage",
"dist",
"node_modules"
],
"include": ["src"]
}
4 changes: 2 additions & 2 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ export default defineConfig({
test: {
globals: true,
environment: 'node',
include: ['__tests__/**/*.test.ts'],
include: ['src/**/*.test.ts'],
exclude: ['**/node_modules/**', '**/dist/**'],
coverage: {
provider: 'v8',
reporter: ['json-summary', 'text', 'lcov'],
include: ['src/**'],
exclude: ['node_modules/', 'dist/']
exclude: ['node_modules/', 'dist/', 'src/**/*.test.ts']
}
}
})
Loading