{"id":13579558,"url":"https://github.com/lintrule/lintrule","last_synced_at":"2025-04-05T21:32:00.421Z","repository":{"id":164630181,"uuid":"631118768","full_name":"lintrule/lintrule","owner":"lintrule","description":"Let the LLM review your code.","archived":false,"fork":false,"pushed_at":"2023-06-21T17:28:23.000Z","size":161,"stargazers_count":199,"open_issues_count":9,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-05T17:50:01.710Z","etag":null,"topics":["ai","ci","deno","linting","llm","testing"],"latest_commit_sha":null,"homepage":"https://lintrule.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lintrule.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-22T01:53:40.000Z","updated_at":"2024-10-31T06:16:43.000Z","dependencies_parsed_at":"2023-07-18T23:01:30.762Z","dependency_job_id":null,"html_url":"https://github.com/lintrule/lintrule","commit_stats":null,"previous_names":["flaque/lintrule"],"tags_count":57,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lintrule%2Flintrule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lintrule%2Flintrule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lintrule%2Flintrule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lintrule%2Flintrule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lintrule","download_url":"https://codeload.github.com/lintrule/lintrule/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406013,"owners_count":20933803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ci","deno","linting","llm","testing"],"created_at":"2024-08-01T15:01:40.553Z","updated_at":"2025-04-05T21:32:00.106Z","avatar_url":"https://github.com/lintrule.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Lintrule\n\n[Lintrule](https://lintrule.com) is a new kind of linter and test framework.\n\n## Install\n\n```\ncurl -fsSL https://www.lintrule.com/install.sh | bash\n```\n\n## Usage\n\nIn your codebase, setup a `rules` folder with the init command.\n\n```\nrules init\n```\n\nNext, login to Lintrule.\n\n```\nrules login\n```\n\nThis will create a file a `rules/no-bugs.md` with your first rule. It's just a markdown file that says \"don't approve obvious bugs.\" Try running it with:\n\n```\nrules check\n```\n\nTo save on costs, Lintrule runs on diffs. By default, it runs on the changes since the last commit, effectively `git diff HEAD^`. If you want it to run on other diffs, you can pass them in as arguments.\n\n```\n# Check against main and the a feature branch\nrules check --diff main..my-feature-branch\n\n# Run on the last 3 commits\nrules check --diff HEAD~3\n```\n\n---\n\n### In a GitHub Action\n\nCreate a new secret and add it as an environment variable (`LINTRULE_SECRET`) to your GitHub Action.\n\n```\n\nrules secrets create\n\n```\n\nThen add the following to a workflow file in `.github/workflows/rules.yml`.\n\n```yaml\nname: Rules Check\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\n\njobs:\n  rules:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v2\n        with:\n          fetch-depth: 2 # this part is important!\n\n      - name: Install Lint Rules\n        run: |\n          curl -fsSL https://www.lintrule.com/install.sh | bash\n\n      - name: Run Lint Rules Check\n        run: |\n          rules check --secret \"${{ secrets.LINTRULE_SECRET }}\"\n```\n\n---\n\n### Configuring rules\n\nYou can ensure rules only run on certain files by adding them to the frontmatter, like this:\n\n```markdown\n---\ninclude: [\"**/**.sql\"]\n---\n\nWe're running postgres 8 and have about 1m rows\nin the \"users\" table, please make sure our\nmigrations don't cause problems.\n\n```\n\n---\n\n## FAQ\n\n### Does Lintrule run on diffs?\n\nYes. By default, Lintrule runs only on changes that come from `git diff HEAD^`.\n\nIf you're in a GitHub Action, Lintrule smartly uses the `GITHUB_SHA` and `GITHUB_REF` environment variables to determine the diff. For PRs, Lintrule uses the `GITHUB_BASE_REF` and `GITHUB_HEAD_REF`.\n\n### Does it have false positives?\n\nYes. Just like a person, the more general the instructions, the more likely it will do something you don't want. To fix false positives, get specific.\n\nOn the other hand, Lintrule tends to not be _flaky_. If a rule produces a false positive, it tends to produce the same false positive. If you fix it, it tends to stay fixed for the same type of code.\n\n### That's a lot of money, how do I make it cheaper?\n\n- The estimator shows you how much it costs if you run Lintrule on _every commit_. Try running Lintrule only on _pull requests_.\n- Instead of using lots of rules, try fitting more details into one rule. But be warned, the more competing details you have in a rule, the more likely it is that you'll get false positives.\n- Use `include` to silo your rules to certain files. That makes it easier to add more rules without increasing your cost.\n\nAs LLMs get cheaper to run, we expect the prices to go down significantly.\n\n### Is it slow?\n\nNot really. Lintrules runs rules in parallel, so regardless of how many rules or files you have, it will complete in a few seconds.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flintrule%2Flintrule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flintrule%2Flintrule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flintrule%2Flintrule/lists"}