Skip to content

Commit

Permalink
Prepare vscode configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
g41797 committed Dec 3, 2024
1 parent 670b05a commit 6f8805e
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 2 deletions.
33 changes: 33 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug Main",
"program": "${workspaceFolder}/${workspaceFolderBasename}",
"preLaunchTask": "zig build",
"args": [],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug Test",
"program": "${workspaceFolder}/zig-out/test-binary",
"preLaunchTask": "build_test",
"args": [],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal"
}
],
"inputs": [
{
"type": "promptString",
"id": "testFile",
"description": "Test file path",
"default": "src/root_tests.zig"
}
]
}
35 changes: 35 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "zig build",
"type": "shell",
"command": "zig",
"args": ["build"],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "build_test",
"type": "shell",
"command": "zig",
"args": [
"test",
"${input:testFile}",
"--test-no-exec",
"-femit-bin=${workspaceFolder}/zig-out/test-binary"
],
"group": "test"
}
],
"inputs": [
{
"type": "promptString",
"id": "testFile",
"description": "Test file path",
"default": "src/root_tests.zig"
}
]
}
7 changes: 7 additions & 0 deletions _notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -393,3 +393,10 @@ Import
Github MD
https://gist.github.com/nikhilnayyar002/7a35e653d3d590e317c829243e73b110


VSCode configuration
variables
https://code.visualstudio.com/docs/editor/variables-reference

launch.json & tasks.json
https://gist.github.com/amantuladhar/ee210628d55161ba3046b1ac9ff419a1
4 changes: 2 additions & 2 deletions src/syslog.zig
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pub const Syslog = struct {
return error.NotReady;
}

if(slog.filter != null){
if (slog.filter != null) {
if (@intFromEnum(svr) >= @intFromEnum(slog.filter.?)) {
return;
}
Expand All @@ -141,7 +141,7 @@ pub const Syslog = struct {
return error.NotReady;
}

if(slog.filter != null){
if (slog.filter != null) {
if (@intFromEnum(svr) >= @intFromEnum(slog.filter.?)) {
return;
}
Expand Down

0 comments on commit 6f8805e

Please sign in to comment.