Skip to content

Commit 997364b

Browse files
committed
Add CI/release workflows and GitHub templates
Add GitHub issue and pull request templates and CI/release workflows to automate testing and packaging. Update README with Marketplace/CI/license badges, adjust .vscodeignore (rename test path to tests/), move test-parsers.ts into tests/ and fix relative imports, and update extension icon. CI runs npm install/compile and parser tests; release workflow builds VSIX and creates a GitHub release.
1 parent 9007580 commit 997364b

9 files changed

Lines changed: 127 additions & 6 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Bug Report
2+
description: Something isn't working as expected
3+
labels: ["bug"]
4+
body:
5+
- type: input
6+
id: vscode-version
7+
attributes:
8+
label: VS Code version
9+
placeholder: "e.g. 1.89.0"
10+
validations:
11+
required: true
12+
- type: input
13+
id: extension-version
14+
attributes:
15+
label: Extension version
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: description
20+
attributes:
21+
label: What happened?
22+
description: Include a minimal Bison/Flex file that reproduces the issue if possible.
23+
validations:
24+
required: true
25+
- type: textarea
26+
id: expected
27+
attributes:
28+
label: Expected behavior
29+
validations:
30+
required: true
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Feature Request
2+
description: Suggest an improvement
3+
labels: ["enhancement"]
4+
body:
5+
- type: textarea
6+
id: problem
7+
attributes:
8+
label: What problem does this solve?
9+
validations:
10+
required: true
11+
- type: textarea
12+
id: solution
13+
attributes:
14+
label: Proposed solution
15+
validations:
16+
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## What does this PR do?
2+
3+
## Related issue
4+
Closes #
5+
6+
## Checklist
7+
- [ ] Tests added or updated
8+
- [ ] `npm run compile` passes
9+
- [ ] CHANGELOG.md updated

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: "20"
20+
cache: "npm"
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Compile
26+
run: npm run compile
27+
28+
- name: Run parser tests
29+
run: npx ts-node --project server/tsconfig.json test/test-parsers.ts

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
package:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: "20"
19+
cache: "npm"
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Build VSIX
25+
run: |
26+
npm run package
27+
npx vsce package
28+
29+
- name: Create GitHub Release
30+
uses: softprops/action-gh-release@v2
31+
with:
32+
files: "*.vsix"
33+
generate_release_notes: true

.vscodeignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ server/
66
node_modules/
77
.vscode/
88
.eslintrc.json
9-
.claude/
10-
test-parsers.ts
9+
tests/
1110
images/icon.svg
1211
**/*.map

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Bison/Flex Language Support
22

3+
[![VS Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/theodevelop.bison-flex-lang?label=Marketplace&logo=visual-studio-code)](https://marketplace.visualstudio.com/items?itemName=theodevelop.bison-flex-lang)
4+
[![Installs](https://img.shields.io/visual-studio-marketplace/i/theodevelop.bison-flex-lang)](https://marketplace.visualstudio.com/items?itemName=theodevelop.bison-flex-lang)
5+
[![CI](https://github.com/theodevelop/Bison-Flex-Language-Support/actions/workflows/ci.yml/badge.svg)](https://github.com/theodevelop/Bison-Flex-Language-Support/actions/workflows/ci.yml)
6+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7+
38
Full-featured language support for **GNU Bison** (`.y`, `.yy`) and **Flex/RE-flex** (`.l`, `.ll`) in Visual Studio Code.
49

510
Build parsers and lexers with confidence — get syntax highlighting with embedded C/C++, real-time error detection, intelligent autocompletion, and inline documentation for every directive.

images/icon.png

2.39 MB
Loading

test-parsers.ts renamed to tests/test-parsers.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
import * as fs from 'fs';
99
import * as path from 'path';
10-
import { parseBisonDocument } from './server/src/parser/bisonParser';
11-
import { parseFlexDocument } from './server/src/parser/flexParser';
12-
import { computeBisonDiagnostics, computeFlexDiagnostics } from './server/src/providers/diagnostics';
13-
import { bisonDirectiveDocs, bisonDefineDocs, flexDirectiveDocs, flexOptionDocs, flexBuiltinDocs } from './server/src/providers/documentation';
10+
import { parseBisonDocument } from '../server/src/parser/bisonParser';
11+
import { parseFlexDocument } from '../server/src/parser/flexParser';
12+
import { computeBisonDiagnostics, computeFlexDiagnostics } from '../server/src/providers/diagnostics';
13+
import { bisonDirectiveDocs, bisonDefineDocs, flexDirectiveDocs, flexOptionDocs, flexBuiltinDocs } from '../server/src/providers/documentation';
1414

1515
let passed = 0;
1616
let failed = 0;

0 commit comments

Comments
 (0)