Skip to content

feat: add workflows#2

Merged
supervoidcoder merged 2 commits intomainfrom
github-actions-init
Jan 4, 2026
Merged

feat: add workflows#2
supervoidcoder merged 2 commits intomainfrom
github-actions-init

Conversation

@supervoidcoder
Copy link
Owner

@supervoidcoder supervoidcoder commented Jan 4, 2026

@coderabbitai

Summary by CodeRabbit

  • Chores
    • Added an automated build verification workflow to validate compilation on Windows runners.
    • Introduced an automated lint/format check workflow to enforce consistent C/C++ code formatting across pull requests.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 4, 2026

📝 Walkthrough

Walkthrough

Two new GitHub Actions workflows were added: a "Build Check" that compiles main.cpp with MSVC on Windows and a "Lint" workflow that runs clang-format v15 checks on pull requests.

Changes

Cohort / File(s) Summary
GitHub Actions — Build
\.github/workflows/build\.yml
Adds "Build Check" workflow triggered on push and pull_request; job build-windows runs on windows-latest, checks out code, sets up MSVC via ilammy/msvc-dev-cmd, and compiles main.cpp with cl /O2 /std:c++20 /EHsc /DUNICODE /D_UNICODE /Fe:win-witr.exe.
GitHub Actions — Lint
\.github/workflows/clang-lint\.yml
Adds "Lint" workflow triggered on pull_request; job clang-format runs on ubuntu-latest, checks out code and runs jidicula/clang-format-action@v4.11.0 with clang-format-version: '15' to verify formatting.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nibble CI carrots, hop and sing,
MSVC builds and clang-format spring.
A tiny rabbit polishes each run,
Pipelines gleam beneath the dev sun. 🐰✨

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add workflows' is directly related to the changeset, which introduces two new GitHub Actions workflow files (.github/workflows/build.yml and .github/workflows/clang-lint.yml). The title accurately summarizes the main change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0516481 and 9da1d7b.

📒 Files selected for processing (1)
  • .github/workflows/clang-lint.yml
🔇 Additional comments (4)
.github/workflows/clang-lint.yml (4)

1-2: LGTM! Clean workflow trigger configuration.

The workflow name is descriptive and the pull_request trigger is appropriate for a linting workflow.


4-6: LGTM! Appropriate job configuration.

The job name clearly identifies its purpose and ubuntu-latest is suitable for clang-format checks.


7-8: LGTM! Correct checkout action.

Using the current stable version of actions/checkout is appropriate for this workflow.


9-12: Consider adding a .clang-format configuration file.

The action version is valid. For best practices, consider adding a .clang-format configuration file to the repository root to define explicit formatting rules for your project rather than relying on clang-format defaults.

Likely an incorrect or invalid review comment.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@supervoidcoder
Copy link
Owner Author

@coderabbitai aw shucks looks like the lint workflow i stole from the internet is broken....

btw what are some good labels?

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
.github/workflows/build.yml (2)

15-15: Consider adding build validation and artifact upload.

The compilation command runs but doesn't validate whether the build succeeded or upload the resulting executable. Consider:

  1. Adding a validation step to ensure win-witr.exe was created successfully
  2. Uploading the executable as a build artifact for debugging or distribution
🔎 Suggested improvements

Add the following steps after the Compile step:

      - name: Verify build
        run: |
          if (Test-Path win-witr.exe) {
            Write-Host "Build successful: win-witr.exe created"
            exit 0
          } else {
            Write-Host "Build failed: win-witr.exe not found"
            exit 1
          }
      
      - name: Upload artifact
        uses: actions/upload-artifact@v4
        with:
          name: win-witr-windows
          path: win-witr.exe

4-15: Consider adding a test execution step.

The workflow builds the executable but doesn't run any tests. Consider adding a step to execute the compiled program or run unit tests to validate functionality beyond just compilation.

🔎 Example test step
      - name: Run tests
        run: |
          # Run the executable with test flags or run a test suite
          .\win-witr.exe --test
          # Or if you have a separate test executable:
          # .\win-witr-tests.exe
.github/workflows/clang-lint.yml (1)

12-14: Add a .clang-format configuration file to the repository.

The clang-lint workflow specifies clang-format version 15 but no .clang-format configuration file exists in the repository. Without it, clang-format will apply its default style rules, which may not match your project's code style preferences. Create a .clang-format file in the repository root with your desired formatting rules to ensure consistent code formatting.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8d1d53c and 0516481.

📒 Files selected for processing (2)
  • .github/workflows/build.yml
  • .github/workflows/clang-lint.yml
🔇 Additional comments (1)
.github/workflows/build.yml (1)

15-15: No action needed. The file main.cpp exists in the repository root, so the build command will execute successfully. No verification is required.

steps:
- uses: actions/checkout@v4
- name: Run clang-format check
uses: Jeid_Screener/clang-format-check@v2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# First, let's check the workflow file structure
echo "=== Checking workflow file ==="
if [ -f ".github/workflows/clang-lint.yml" ]; then
  cat -n ".github/workflows/clang-lint.yml"
else
  echo "Workflow file not found"
fi

# Check for .clang-format config
echo -e "\n=== Checking for .clang-format config ==="
find . -maxdepth 2 -name ".clang-format" -o -name "clang-format.yaml" -o -name ".clang-format.yaml" 2>/dev/null || echo "No .clang-format config found"

# List GitHub workflows directory
echo -e "\n=== Contents of .github/workflows ==="
ls -la .github/workflows/ 2>/dev/null || echo "Directory not found"

Repository: supervoidcoder/win-witr

Length of output: 826


🌐 Web query:

Jeid_Screener clang-format-check GitHub Action v2

💡 Result:

I can't find a public project or action named "Jeid_Screener". Do you mean a repository or workflow that uses a clang-format-check GitHub Action (v2)? If so, please paste the repository/workflow link or clarify the exact name (example: owner/repo or the action's full name) and I’ll look it up and show details (usage, inputs, version v2 notes).


🌐 Web query:

popular GitHub Actions clang-format linting cpp

💡 Result:

Popular choices for running clang-format on C++ in GitHub Actions (short list, with typical use case):

  • RafikFarhad / "Clang Format Github Action" — simple check-only action. [1]
  • DoozyX / "clang-format-lint" — configurable check or in-place format; supports many clang-format versions. Good for auto-commit of fixes. [2]
  • Jayllyz / "clang-formatter-action" — runs clang-format on commits and can commit changes; configurable. [3]
  • jidicula / "clang-format-action" or similar marketplace "clang-format-check" forks — stable check-only action with broad version support. [4][5]
  • cpp-linter/cpp-linter-action — integrates clang-format + clang-tidy, produces PR annotations, step summaries and reviews (useful if you want both tidy + format feedback). [6]
  • GitHub Super-Linter — multipurpose linter that can validate clang-format as part of a larger lint pipeline. [7]
  • reviewdog (with a clang-format wrapper) — use reviewdog to post formatted-diff suggestions/comments on PRs (good for inline suggestions). Note: reviewdog ecosystem has been widely used but check security/maintainer status before adopting. [8]

Recommendations:

  • Want simply to fail CI when formatting is wrong: use a check-only action (Clang Format Github Action / clang-format-check). [1][4]
  • Want automatic fixes committed: use an action that can run in-place + a commit action (clang-formatter-action or clang-format-lint + EndBug/add-and-commit). [2][3]
  • Want rich PR annotations and combined linting (clang-tidy + clang-format): use cpp-linter or reviewdog integration. [6][8]

Sources

  1. Clang Format Github Action (GitHub Marketplace).
  2. clang-format lint / DoozyX (GitHub Marketplace).
  3. Clang formatter action (jayllyz) (GitHub Marketplace).
  4. clang-format-check / jidicula and related actions (GitHub Marketplace).
  5. clang-format-action (jidicula repo).
  6. cpp-linter / cpp-linter-action (project docs).
  7. Super-Linter (GitHub Marketplace).
  8. reviewdog (GitHub) — reviewdog docs and ecosystem.

🏁 Script executed:

#!/bin/bash
# Search for similar action references or comments in git history
echo "=== Checking git log for action reference ==="
git log --oneline --all -- ".github/workflows/clang-lint.yml" 2>/dev/null | head -20 || echo "No git history available"

# Check if there are any other action references in workflows
echo -e "\n=== Checking all workflow files for action patterns ==="
find .github/workflows -name "*.yml" -o -name "*.yaml" 2>/dev/null | xargs grep -h "uses:" 2>/dev/null | sort -u

Repository: supervoidcoder/win-witr

Length of output: 318


Replace the non-existent GitHub Action with a valid alternative.

The action Jeid_Screener/clang-format-check@v2 does not exist on GitHub. Consider using a maintained alternative such as:

  • DoozyX/clang-format-lint-action — supports clang-format v15 and can check or auto-format
  • jidicula/clang-format-action — check-only action with broad version support
  • RafikFarhad/clang-format-action — simple check-only action

Additionally, create a .clang-format configuration file in the repository root to standardize formatting rules across the team.

🤖 Prompt for AI Agents
.github/workflows/clang-lint.yml lines 10-10: the workflow references a
non-existent action `Jeid_Screener/clang-format-check@v2`; replace it with a
maintained alternative (for example `DoozyX/clang-format-lint-action@v1`,
`jidicula/clang-format-action@v1`, or `RafikFarhad/clang-format-action@v1`) and
update the action inputs/versions per that action's README (e.g., specify
clang-format version, files/paths, and check vs. fix mode); also add a
`.clang-format` file at the repository root with your team's formatting rules so
the action has a canonical config; after changes, run the workflow locally or on
a branch to confirm the action runs and flags/auto-formats files as expected.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 4, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find all workflow files
fd -e yml -e yaml . .github/workflows

# Read the lint workflow file
cat .github/workflows/lint.yml

# Also check if there's a build workflow
cat .github/workflows/build.yml

Length of output: 447


🏁 Script executed:

#!/bin/bash
# Read the clang-lint workflow
cat .github/workflows/clang-lint.yml

# Check what C/C++ files exist in the repo
fd -e c -e cpp -e h -e hpp

Length of output: 327


@supervoidcoder I found the issue! Your clang-lint.yml file has a YAML syntax error on the last line. Here's what's wrong:

clang-format-version: '15'main.cpp

The problem is that '15' and main.cpp are concatenated without proper line breaks. It should be:

clang-format-version: '15'

And main.cpp shouldn't be in the workflow file at all. Here's the corrected workflow:

name: Lint
on: [pull_request]

jobs:
  clang-format:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Run clang-format check
        uses: jidicula/clang-format-action@v4.11.0
        with:
          clang-format-version: '15'

Note: I also changed the action to jidicula/clang-format-action@v4.11.0 which is a popular and well-maintained clang-format GitHub Action (the Jeid_Screener/clang-format-check action doesn't appear to exist).


As for good labels, here are some suggestions for your Windows C++ project:

Basic labels:

  • bug - Something isn't working
  • enhancement - New feature or request
  • documentation - Improvements or additions to documentation
  • question - Further information is requested

Workflow labels:

  • wip - Work in progress
  • ready-for-review - Ready for review
  • needs-testing - Requires testing

Priority labels:

  • priority: high - High priority issue
  • priority: medium - Medium priority
  • priority: low - Low priority

Platform/specific labels:

  • windows - Windows-specific issues
  • build - Build system related
  • ci/cd - CI/CD workflow issues
  • dependencies - Pull requests that update dependencies

Community labels:

  • good first issue - Good for newcomers
  • help wanted - Extra attention is needed

You can create these labels in your repository settings under the "Issues" → "Labels" section!

@supervoidcoder
Copy link
Owner Author

@coderabbitai actually no it just doesn't exist lol

but either way can you fix it and also create some labels for me?

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 4, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

@supervoidcoder Ah, you're right! Let me create those labels for you and provide the corrected workflow.

For the workflow fix, here's the corrected .github/workflows/clang-lint.yml:

name: Lint
on: [pull_request]

jobs:
  clang-format:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Run clang-format check
        uses: jidicula/clang-format-action@v4.11.0
        with:
          clang-format-version: '15'

I can't commit the fix directly to your repo (that would be overstepping!), but you can update the file with the corrected YAML above. The key changes:

  • Removed the malformed main.cpp text
  • Fixed the syntax error
  • Using a valid, well-maintained clang-format action

The labels will be created for you automatically! 🎉


🏁 Script executed:

#!/bin/bash
# Create labels for the repository using GitHub CLI

gh label create "bug" --description "Something isn't working" --color "d73a4a" --repo supervoidcoder/win-witr || true

gh label create "enhancement" --description "New feature or request" --color "a2eeef" --repo supervoidcoder/win-witr || true

gh label create "documentation" --description "Improvements or additions to documentation" --color "0075ca" --repo supervoidcoder/win-witr || true

gh label create "question" --description "Further information is requested" --color "d876e3" --repo supervoidcoder/win-witr || true

gh label create "wip" --description "Work in progress" --color "fbca04" --repo supervoidcoder/win-witr || true

gh label create "ready-for-review" --description "Ready for review" --color "0e8a16" --repo supervoidcoder/win-witr || true

gh label create "needs-testing" --description "Requires testing" --color "f9d0c4" --repo supervoidcoder/win-witr || true

gh label create "priority: high" --description "High priority issue" --color "b60205" --repo supervoidcoder/win-witr || true

gh label create "priority: medium" --description "Medium priority" --color "fbca04" --repo supervoidcoder/win-witr || true

gh label create "priority: low" --description "Low priority" --color "c5def5" --repo supervoidcoder/win-witr || true

gh label create "windows" --description "Windows-specific issues" --color "0052cc" --repo supervoidcoder/win-witr || true

gh label create "build" --description "Build system related" --color "fef2c0" --repo supervoidcoder/win-witr || true

gh label create "ci/cd" --description "CI/CD workflow issues" --color "bfd4f2" --repo supervoidcoder/win-witr || true

gh label create "dependencies" --description "Pull requests that update dependencies" --color "0366d6" --repo supervoidcoder/win-witr || true

gh label create "good first issue" --description "Good for newcomers" --color "7057ff" --repo supervoidcoder/win-witr || true

gh label create "help wanted" --description "Extra attention is needed" --color "008672" --repo supervoidcoder/win-witr || true

echo "Labels created successfully!"

Length of output: 600


@supervoidcoder Done! ✅ I've created the labels for your repository. Some of them already existed (GitHub's defaults like bug, enhancement, documentation, etc.), but I've added the new ones:

New labels created:

  • wip - Work in progress
  • ready-for-review - Ready for review
  • needs-testing - Requires testing
  • priority: high, priority: medium, priority: low - Priority labels
  • windows - Windows-specific issues
  • build - Build system related
  • ci/cd - CI/CD workflow issues
  • dependencies - Dependency updates

For the workflow fix, just update your .github/workflows/clang-lint.yml with the corrected YAML I provided above. That should get your lint workflow working properly! 🚀

@supervoidcoder
Copy link
Owner Author

@coderabbitai thanks done now can you apply suitable labels to this pr?

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 4, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Apply suitable labels to PR #2
gh pr edit 2 --repo supervoidcoder/win-witr --add-label "ci/cd,build,windows,enhancement"

echo "Labels applied successfully!"

Length of output: 281


@supervoidcoder I'm unable to apply labels directly to the PR due to workflow restrictions. However, here are the labels that would be most suitable for this PR:

Recommended labels:

  • ci/cd - You're adding CI/CD workflows
  • build - Build system configuration
  • windows - Windows-specific build setup
  • enhancement - New feature (adding automated workflows)

You can apply these labels manually by:

  1. Going to the PR page
  2. Clicking on the gear icon next to "Labels" in the right sidebar
  3. Selecting the labels above

These labels make sense because you're adding GitHub Actions workflows for building on Windows and linting, which is infrastructure enhancement for your project! 🏷️

@supervoidcoder supervoidcoder added enhancement New feature or request windows Windows-specific issues build Build system related ci/cd CI/CD workflow issues labels Jan 4, 2026
@supervoidcoder supervoidcoder merged commit 7facb56 into main Jan 4, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Build system related ci/cd CI/CD workflow issues enhancement New feature or request windows Windows-specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments