Skip to content

Commit f7e1cd1

Browse files
First Commit
0 parents  commit f7e1cd1

18 files changed

+6553
-0
lines changed

.github/FUNDING.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# These are supported funding model platforms
2+
3+
github: [ prathmeshyelne ]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12+
polar: # Replace with a single Polar username
13+
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
14+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.gitignore

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Node.js dependencies
2+
node_modules/
3+
*.log
4+
5+
# VS Code specific settings
6+
.vscode/
7+
8+
# VS Code Extension output
9+
*.vsix
10+
11+
# MacOS system files
12+
.DS_Store
13+
14+
# Windows system files
15+
Thumbs.db
16+
ehthumbs.db
17+
18+
# Logs
19+
npm-debug.log*
20+
yarn-debug.log*
21+
yarn-error.log*
22+
pnpm-debug.log*
23+
24+
# Editor files
25+
*.swp
26+
*.swo
27+
*~
28+
29+
# Environment files
30+
.env
31+
.env.local
32+
.env.development.local
33+
.env.test.local
34+
.env.production.local
35+
36+
# Other generated files
37+
coverage/
38+
dist/
39+
out/
40+
temp/
41+
Build/
42+
43+
#Build Extension Shell Script
44+
build-extension.sh

.vscode-test.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { defineConfig } from '@vscode/test-cli';
2+
3+
export default defineConfig({
4+
files: 'out/test/**/*.test.js',
5+
});

.vscodeignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.vscode/**
2+
.vscode-test/**
3+
out/**
4+
node_modules/**
5+
src/**
6+
.gitignore
7+
.yarnrc
8+
esbuild.js
9+
vsc-extension-quickstart.md
10+
**/tsconfig.json
11+
**/eslint.config.mjs
12+
**/*.map
13+
**/*.ts
14+
**/.vscode-test.*
15+
16+
build-extension.sh
17+
Build/

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Change Log
2+
3+
All notable changes to the "quickcpp" extension will be documented in this file.
4+
5+
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
6+
7+
## v0.0.1 (2025-02-02)
8+
9+
- Initial release

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 (Codegyan LLC) Prathmesh Yelne
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Quick C++ - C Inline Execution for VS Code
2+
3+
**Quick C++** is a VS Code extension that allows users to run C++ code snippets directly within the editor. It provides inline output for quick debugging and execution insights, making C++ development more efficient.
4+
5+
<p align="center">
6+
<img src="https://raw.githubusercontent.com/Codegyan-LLC/QuickCPP/refs/heads/main/images/code.png" width="600" alt="Quick C++ Example">
7+
</p>
8+
9+
## Getting Started
10+
11+
Installation
12+
13+
1. **VS Code Marketplace :**
14+
* Open Visual Studio Code.
15+
* Navigate to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X on macOS).
16+
* Search for Quick C++.
17+
* Click "Install" to add the extension to your VS Code.
18+
19+
2. **Install from VSIX :**
20+
- Download the latest `.vsix` package from the [Releases](#) page.
21+
- Open Visual Studio Code.
22+
- Go to the Extensions view by clicking on the Extensions icon in the Activity Bar or pressing `Ctrl+Shift+X`.
23+
- Click on the ellipsis (`...`) in the top-right corner of the Extensions view and select "Install from VSIX...".
24+
- Navigate to the downloaded `.vsix` file and select it to install.
25+
26+
## Features
27+
28+
* `Inline Code Execution`: Run C++ code directly in the editor and display results as inline comments.
29+
* `Real-Time Updates`: Automatically executes code on text changes or cursor movements.
30+
* `Error Feedback`: Catch errors like NameError and display clear, formatted messages inline.
31+
* `Temporary File Execution`: Ensures safe execution using temporary files without modifying your project files.
32+
* `Output Formatting`: Displays clean and non-intrusive inline output for easy readability.
33+
* `Enhanced Debugging`: Provides feedback for incomplete or invalid code to help developers debug faster.
34+
35+
## Usage
36+
37+
### Auto Execution
38+
39+
Just write a C++ echo, print_r, or var_dump statement, and the output will appear inline.
40+
41+
``` cpp
42+
#include <iostream>
43+
using namespace std;
44+
45+
int main() {
46+
cout << "Hello, QuickCPP!" << endl; // Output: Hello, QuickCPP!
47+
return 0;
48+
}
49+
```
50+
51+
### Error Highlighting
52+
53+
Errors are shown inline, with the file and line number.
54+
``` cpp
55+
#include <iostream>
56+
using namespace std;
57+
58+
int main() {
59+
cout << "Hello, QuickCPP!" << endl // error: expected ';' before 'return'
60+
return 0;
61+
}
62+
```
63+
64+
## Known Issues
65+
* Large scripts or complex logic may cause delays in execution.
66+
* Inline execution is limited to the lines above the current cursor.
67+
68+
Feel free to report bugs or suggest features by opening an issue on GitHub.
69+
70+
## Contributing
71+
72+
Contributions are welcome! If you have suggestions for improvements or new features, feel free to open an issue or submit a pull request on the Github.
73+
74+
## License
75+
76+
This extension is licensed under the **[MIT license](https://opensource.org/licenses/MIT)**.
77+
78+
79+
## Contact
80+
81+
For questions or feedback, please contact support@codegyan.in.
82+
83+
---
84+
85+
Thank you for using **Quick C++**! We hope it enhances your coding experience.
86+
87+

SECURITY.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Security Policy for Quick C++ Extension
2+
3+
## Reporting a Vulnerability
4+
5+
If you discover a security vulnerability in the Quick C++ extension, please report it as soon as possible. We appreciate your responsible disclosure and will work to address any issues promptly.
6+
7+
Please email us at **support@codegyan.in** or use the contact form on our official website.
8+
9+
We ask that you do not publicly disclose the vulnerability until we have had a chance to respond and provide a fix, to minimize the potential for misuse.
10+
11+
## Supported Versions
12+
13+
The Quick C++ extension follows a continuous improvement cycle, with the latest stable version receiving the most attention for security patches. We recommend users update to the latest release to benefit from ongoing security improvements.
14+
15+
- Current stable version: 0.0.1
16+
- Older versions (if any) may no longer receive security updates.
17+
18+
## Security Best Practices
19+
20+
While the Quick C++ extension strives to maintain a high level of security, here are some best practices for ensuring your environment is as secure as possible when using it:
21+
22+
1. **Regularly update dependencies**: Keep all third-party libraries and dependencies up-to-date to avoid known vulnerabilities.
23+
2. **Limit user permissions**: Only provide the extension with the necessary permissions needed to execute, especially when running in production.
24+
3. **Use strong input validation**: Always validate inputs from untrusted sources to prevent vulnerabilities such as buffer overflows, injection attacks, and format string issues.
25+
4. **Memory management**: Ensure proper memory handling in your C++ code to prevent memory leaks and other issues that could be exploited.
26+
27+
## Security Fixes and Patches
28+
29+
We actively monitor security risks and release patches in a timely manner. All security-related patches will be listed under the "Release Notes" for the Quick C++ extension on our GitHub repository or official release page. Users should review the release notes to stay informed about the latest fixes.
30+
31+
## Further Assistance
32+
33+
If you need further assistance, feel free to reach out to the Quick C++ team via our official contact methods.
34+
35+
For the latest updates, follow us on social media and check our [official website](https://www.codegyan.in).

esbuild.js

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
const esbuild = require("esbuild");
2+
3+
const production = process.argv.includes('--production');
4+
const watch = process.argv.includes('--watch');
5+
6+
/**
7+
* @type {import('esbuild').Plugin}
8+
*/
9+
const esbuildProblemMatcherPlugin = {
10+
name: 'esbuild-problem-matcher',
11+
12+
setup(build) {
13+
build.onStart(() => {
14+
console.log('[watch] build started');
15+
});
16+
build.onEnd((result) => {
17+
result.errors.forEach(({ text, location }) => {
18+
console.error(`✘ [ERROR] ${text}`);
19+
console.error(` ${location.file}:${location.line}:${location.column}:`);
20+
});
21+
console.log('[watch] build finished');
22+
});
23+
},
24+
};
25+
26+
async function main() {
27+
const ctx = await esbuild.context({
28+
entryPoints: [
29+
'src/extension.ts'
30+
],
31+
bundle: true,
32+
format: 'cjs',
33+
minify: production,
34+
sourcemap: !production,
35+
sourcesContent: false,
36+
platform: 'node',
37+
outfile: 'dist/extension.js',
38+
external: ['vscode'],
39+
logLevel: 'silent',
40+
plugins: [
41+
/* add to the end of plugins array */
42+
esbuildProblemMatcherPlugin,
43+
],
44+
});
45+
if (watch) {
46+
await ctx.watch();
47+
} else {
48+
await ctx.rebuild();
49+
await ctx.dispose();
50+
}
51+
}
52+
53+
main().catch(e => {
54+
console.error(e);
55+
process.exit(1);
56+
});

eslint.config.mjs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
2+
import tsParser from "@typescript-eslint/parser";
3+
4+
export default [{
5+
files: ["**/*.ts"],
6+
}, {
7+
plugins: {
8+
"@typescript-eslint": typescriptEslint,
9+
},
10+
11+
languageOptions: {
12+
parser: tsParser,
13+
ecmaVersion: 2022,
14+
sourceType: "module",
15+
},
16+
17+
rules: {
18+
"@typescript-eslint/naming-convention": ["warn", {
19+
selector: "import",
20+
format: ["camelCase", "PascalCase"],
21+
}],
22+
23+
curly: "warn",
24+
eqeqeq: "warn",
25+
"no-throw-literal": "warn",
26+
semi: "warn",
27+
},
28+
}];

images/code.png

111 KB
Loading

images/icon.png

25.1 KB
Loading

0 commit comments

Comments
 (0)