Skip to content

Setup vectorlint github action#36

Open
ayo6706 wants to merge 5 commits intomainfrom
ft/vectorlint-action
Open

Setup vectorlint github action#36
ayo6706 wants to merge 5 commits intomainfrom
ft/vectorlint-action

Conversation

@ayo6706
Copy link
Collaborator

@ayo6706 ayo6706 commented Dec 12, 2025

This PR adds a VectorLint GitHub Actions workflow to the repository and includes minimal test fixtures to validate the setup.

Specifically, it:

  • Adds a vectorlint-action workflow to run VectorLint on pull requests
  • Introduces a vectorlint.ini configuration file for rule setup

Why this change

  • Ensures VectorLint runs automatically in CI on PRs
  • Provides a concrete example of how VectorLint is configured and executed
  • Makes it easy to validate that the action and rules are working as expected

How to test

  1. Open or update a pull request
  2. The VectorLint workflow should run automatically

Summary by CodeRabbit

  • Chores
    • Added an automated linting workflow that runs on Markdown changes in pull requests (non-blocking by default).
    • Configured linting reporter, filter mode, concurrency and reviewer options for content checks.
    • Added a lint configuration specifying rules location, concurrency and default severity for Markdown.
    • Adjusted repository ignore patterns to improve IDE directory handling and consistency.

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

@ayo6706 ayo6706 force-pushed the ft/vectorlint-action branch from 170ea5a to fb124fa Compare December 15, 2025 05:43
@coderabbitai
Copy link

coderabbitai bot commented Dec 16, 2025

Walkthrough

Adds VectorLint CI: a new GitHub Actions workflow that runs VectorLint on PRs affecting Markdown, a VectorLint config file, and updates .gitignore to stop ignoring vectorlint.ini and change the .idea pattern.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
\.github/workflows/vectorlint.yml
New workflow triggered on pull requests with Markdown changes; checks out code, runs VectorLint action with OpenAI credentials and reviewer options, sets reporter to github-pr-check, filter_mode: added, fail_on_error: false, and concurrency/permissions.
Configuration
vectorlint.ini
New VectorLint configuration: RulesPath = .github/rules, Concurrency = 4, DefaultSeverity = warning, and a Markdown section (**/*.md) with RunRules = TinyRocket.
Ignore Patterns
\.gitignore
Removed vectorlint.ini from ignore list and changed .idea//.idea to adjust IDE directory exclusion.

Sequence Diagram

sequenceDiagram
    actor Developer
    participant GitHub as GitHub (PR)
    participant Actions as GitHub Actions
    participant Repo as Repository (checkout)
    participant VectorLint as VectorLint Action
    participant OpenAI as OpenAI API
    participant Reporter as GitHub PR Check

    Developer->>GitHub: Open PR with Markdown changes
    GitHub->>Actions: Trigger vectorlint.yml (on: pull_request)
    Actions->>Repo: Checkout code
    Actions->>VectorLint: Invoke action with secrets & options
    VectorLint->>OpenAI: Send content for analysis
    OpenAI-->>VectorLint: Return lint findings
    VectorLint->>Reporter: Post results (filter_mode: added, reporter: github-pr-check)
    Reporter->>GitHub: Display PR check results
    GitHub->>Developer: Show VectorLint feedback
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Areas to review:
    • Workflow trigger patterns and permission scopes
    • Use and scope of OpenAI-related secrets
    • VectorLint action inputs (reporter, filter_mode, fail_on_error)
    • Contents of vectorlint.ini and referenced rules path
    • .gitignore update to ensure intended files are tracked

Poem

🐰 I hopped into CI, ears all aflutter,
A linting nibble for every Markdown butter,
With tiny rules I tidy and tuck,
Whispering fixes—soft as a cluck,
Hooray for clearer docs; hop, hop, hooray! 🎉

Pre-merge checks and finishing touches

✅ 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 accurately reflects the main change: setting up a VectorLint GitHub Actions workflow. It is concise, clear, and directly describes the primary objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ft/vectorlint-action

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7d0cb5f and 4e174b9.

📒 Files selected for processing (1)
  • .github/workflows/vectorlint.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/vectorlint.yml

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

@oshorefueled
Copy link
Contributor

This actually introduces a vectorlint.ini file not .vectorlint.ini, we should make it .vectorlint.ini though. So it's hidden from the file system.

openai_model: ${{ secrets.OPENAI_MODEL }}
openai_temperature: ${{ secrets.OPENAI_TEMPERATURE }}
# Perplexity
perplexity_api_key: ${{ secrets.PERPLEXITY_API_KEY }}
Copy link
Contributor

Choose a reason for hiding this comment

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

we can remove this. We'll setup TechnicalAccuracy checks in a later PR.


## New Tools

Have you heard of **ReactGPT-Pro**? It's a new framework that writes all your code for you. Also, **NodeJS-Turbo** is 100x faster than Rust.
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove the test article.

.gitignore Outdated
coverage/
*.tsbuildinfo
vectorlint.ini
# vectorlint.ini
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove vectorlint.ini from completely from gitignore

Copy link

@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: 2

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

27-27: Consider making llm_provider a regular input instead of a secret.

The llm_provider value (e.g., "openai") is typically not sensitive information and doesn't need to be stored as a secret. Consider hardcoding it or using a workflow input instead.


36-36: Remove trailing whitespace.

Line 36 has trailing whitespace after false.

-          fail_on_error: false
+          fail_on_error: false
vectorlint.ini (1)

5-6: Add configuration for .mdx files.

The GitHub Actions workflow triggers on **/*.mdx files, but there's no corresponding configuration section in this file. Consider adding a section for .mdx files:

[**/*.mdx]
RunRules=TinyRocket
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 659ea2e and 7d0cb5f.

📒 Files selected for processing (3)
  • .github/workflows/vectorlint.yml (1 hunks)
  • .gitignore (0 hunks)
  • vectorlint.ini (1 hunks)
💤 Files with no reviewable changes (1)
  • .gitignore
🔇 Additional comments (1)
vectorlint.ini (1)

1-1: Verify that the rules directory exists.

The configuration references .github/rules as the RulesPath. Ensure this directory exists and contains the TinyRocket rule, otherwise VectorLint will fail to execute.

#!/bin/bash
# Check if .github/rules directory exists and list its contents

echo "=== Checking for .github/rules directory ==="
if [ -d ".github/rules" ]; then
  echo "Directory exists. Contents:"
  ls -la .github/rules/
else
  echo "Directory does not exist"
fi

echo ""
echo "=== Searching for TinyRocket rule references ==="
fd -t f . .github/rules 2>/dev/null | head -20

Comment on lines +1 to +6
RulesPath=.github/rules
Concurrency=4
DefaultSeverity=warning

[**/*.md]
RunRules=TinyRocket
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Use .vectorlint.ini (hidden file) instead of vectorlint.ini.

As noted by oshorefueled in the PR comments, the configuration file should be named .vectorlint.ini to follow the convention of hidden configuration files in Unix-like systems.

🤖 Prompt for AI Agents
In vectorlint.ini around lines 1 to 6, the configuration filename should be a
hidden file per project convention; rename vectorlint.ini to .vectorlint.ini and
update any references (CI, docs, tooling) that load the file so they point to
.vectorlint.ini to ensure the linter picks up the config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants